refactor: minor
This commit is contained in:
parent
48208c9105
commit
282d56a5c2
@ -122,9 +122,7 @@ workflowGraphForm template = validateAForm validateWorkflowGraphForm . hoistAFor
|
|||||||
[fRef] -> return fRef
|
[fRef] -> return fRef
|
||||||
_other -> throwE $ SomeMessage MsgWorkflowGraphFormInvalidNumberOfFiles
|
_other -> throwE $ SomeMessage MsgWorkflowGraphFormInvalidNumberOfFiles
|
||||||
mContent <- for (fileContent $ sourceFile fRef) $ \fContent -> lift . runDB . runConduit $ fContent .| C.fold
|
mContent <- for (fileContent $ sourceFile fRef) $ \fContent -> lift . runDB . runConduit $ fContent .| C.fold
|
||||||
content <- case mContent of
|
content <- maybe (throwE $ SomeMessage MsgWorkflowGraphFormUploadIsDirectory) return mContent
|
||||||
Nothing -> throwE $ SomeMessage MsgWorkflowGraphFormUploadIsDirectory
|
|
||||||
Just c -> return c
|
|
||||||
either (throwE . SomeMessage . MsgYAMLFieldDecodeFailure . displayException) return . runCatch $ Yaml.decodeThrow content
|
either (throwE . SomeMessage . MsgYAMLFieldDecodeFailure . displayException) return . runCatch $ Yaml.decodeThrow content
|
||||||
fromGraph :: WorkflowGraph FileIdent CryptoUUIDUser -> FileUploads
|
fromGraph :: WorkflowGraph FileIdent CryptoUUIDUser -> FileUploads
|
||||||
fromGraph g = yieldM . runDB $ do
|
fromGraph g = yieldM . runDB $ do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user