Return a JSON Session on a successful POST /login
This will make the UX on a the client-side smoother.
This commit is contained in:
parent
c8ed6e51fe
commit
35b218c543
3 changed files with 12 additions and 6 deletions
|
|
@ -174,8 +174,8 @@ instance FromRow Account where
|
|||
pure Account{..}
|
||||
|
||||
data Session = Session
|
||||
{ username :: Username
|
||||
, role :: Role
|
||||
{ sessionUsername :: Username
|
||||
, sessionRole :: Role
|
||||
} deriving (Eq, Show)
|
||||
|
||||
instance ToJSON Session where
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue