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
|
let fName = letterFileName aletter
|
||||||
renderLetters rcvr letters apcIdent >>= \case
|
renderLetters rcvr letters apcIdent >>= \case
|
||||||
Left err -> sendResponseStatus internalServerError500 $ "PDF generation failed: \n" <> err
|
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)
|
-- sendResponseByteStringFile "demoPDF.pdf" (LBS.toStrict pdf)
|
||||||
-- let typePDF :: ContentType
|
-- let typePDF :: ContentType
|
||||||
-- typePDF = "application/pdf"
|
-- typePDF = "application/pdf"
|
||||||
@ -165,7 +165,7 @@ postTUsersR tid ssh csh tutn = do
|
|||||||
_other -> addMessageI Error MsgErrorUnknownFormAction >> return Nothing
|
_other -> addMessageI Error MsgErrorUnknownFormAction >> return Nothing
|
||||||
|
|
||||||
case tcontent of
|
case tcontent of
|
||||||
Just content -> return content -- abort and return produced content
|
Just act -> act -- abort and return produced content
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
tutors <- runDB $ E.select $ do
|
tutors <- runDB $ E.select $ do
|
||||||
(tutor :& user) <- E.from $ E.table @Tutor `E.innerJoin` E.table @User
|
(tutor :& user) <- E.from $ E.table @Tutor `E.innerJoin` E.table @User
|
||||||
|
|||||||
Reference in New Issue
Block a user