chore(tutorial): attempt to fix download
This commit is contained in:
parent
6699f1d72f
commit
13f53e3221
@ -135,7 +135,7 @@ postTUsersR tid ssh csh tutn = do
|
||||
let fName = letterFileName aletter
|
||||
renderLetters rcvr letters apcIdent >>= \case
|
||||
Left err -> sendResponseStatus internalServerError500 $ "PDF generation failed: \n" <> err
|
||||
Right pdf -> Just <$> sendByteStringAsFile fName (LBS.toStrict pdf) now
|
||||
Right pdf -> return $ Just (sendByteStringAsFile fName (LBS.toStrict pdf) now)
|
||||
-- sendResponseByteStringFile "demoPDF.pdf" (LBS.toStrict pdf)
|
||||
-- let typePDF :: ContentType
|
||||
-- typePDF = "application/pdf"
|
||||
@ -165,7 +165,7 @@ postTUsersR tid ssh csh tutn = do
|
||||
_other -> addMessageI Error MsgErrorUnknownFormAction >> return Nothing
|
||||
|
||||
case tcontent of
|
||||
Just content -> return content -- abort and return produced content
|
||||
Just act -> act -- abort and return produced content
|
||||
Nothing -> do
|
||||
tutors <- runDB $ E.select $ do
|
||||
(tutor :& user) <- E.from $ E.table @Tutor `E.innerJoin` E.table @User
|
||||
|
||||
Loading…
Reference in New Issue
Block a user