Skip to content

Commit dd821df

Browse files
committed
Remove Unnecessary Code
1 parent 99c2a6d commit dd821df

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

IHP/FileStorage/ControllerFunctions.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,9 @@ storeFileWithOptions fileInfo options = do
102102
let destPath :: Text = "static/" <> objectPath
103103
Directory.createDirectoryIfMissing True (cs $ "static/" <> directory)
104104

105-
trySaveFile <- Exception.try $ fileInfo |> get #fileContent |> LBS.writeFile (cs destPath)
106-
case trySaveFile of
107-
Left (Exception.SomeException e) -> throw e
108-
Right _ -> pure ()
105+
fileInfo
106+
|> get #fileContent
107+
|> LBS.writeFile (cs destPath)
109108

110109
let frameworkConfig = getFrameworkConfig ?context
111110
pure $ (get #baseUrl frameworkConfig) <> "/" <> objectPath

0 commit comments

Comments
 (0)