Skip to content

Commit 0540b59

Browse files
Simplify implementation of getAsset
Co-authored-by: Marko Dimjašević <[email protected]>
1 parent 5d87af1 commit 0540b59

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

services/cargohold/src/CargoHold/API/Federation.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,4 @@ streamAsset ga = do
5959
AssetSource <$> S3.downloadV3 (F.gaKey ga)
6060

6161
getAsset :: F.GetAsset -> Handler F.GetAssetResponse
62-
getAsset ga = do
63-
available <- checkAsset ga
64-
pure $ F.GetAssetResponse {F.gaAvailable = available}
62+
getAsset = fmap F.GetAssetResponse . checkAsset

0 commit comments

Comments
 (0)