Return a Session

Define the Session type and return it for the POST /user endpoint
This commit is contained in:
William Carroll 2020-07-24 23:35:49 +01:00
parent 1d47e94bbe
commit 718152ec14
3 changed files with 49 additions and 11 deletions

View file

@ -16,7 +16,7 @@ import qualified Types as T
type API = "user"
:> ReqBody '[JSON] T.User
:> Post '[JSON] (Maybe (Key T.User))
:> Post '[JSON] (Maybe T.Session)
:<|> "user"
:> Capture "name" Text
:> Get '[JSON] (Maybe T.User)