diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index 56bbff3..244eed1 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -847,10 +847,11 @@ routes pipe config = do get "/checkuser" $ do sess <- param "session" user <- liftAndCatchIO $ run (findUser sess) - case user of + case parseUserBson =<< user of Nothing -> status noContent204 Just u -> do status ok200 + Web.Scotty.json (object ["validated" .= uvalidated u]) --Get user associated with session get "/api/user" $ do sess <- param "session"