about summary refs log tree commit diff
path: root/src/API.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-07-31T17·28+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-07-31T17·30+0100
commit35b218c5436ec5ad8fdae3d45a8a949d06b0d920 (patch)
tree1d829b52ab9ddf8723057a7c189b033d99befb2f /src/API.hs
parentc8ed6e51fea30ea2f79cca058c4f161625ab6a85 (diff)
Return a JSON Session on a successful POST /login
This will make the UX on a the client-side smoother.
Diffstat (limited to 'src/API.hs')
-rw-r--r--src/API.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/API.hs b/src/API.hs
index 8bdb6bdfbb73..7b6ed9eae50f 100644
--- a/src/API.hs
+++ b/src/API.hs
@@ -58,7 +58,7 @@ type API =
       -- Miscellaneous
       :<|> "login"
            :> ReqBody '[JSON] T.AccountCredentials
-           :> Post '[JSON] (Headers '[Header "Set-Cookie" SetCookie] NoContent)
+           :> Post '[JSON] (Headers '[Header "Set-Cookie" SetCookie] T.Session)
       :<|> "logout"
            :> SessionCookie
            :> Get '[JSON] (Headers '[Header "Set-Cookie" SetCookie] NoContent)