YS
Size: a a a
YS
YS
YS
YS
YS
reqBody <- strictRequestBody req
let maybeAuthLogin = decodeStrict $ toStrict reqBody
case maybeAuthLogin of
Nothing ->
respond $ responseBadRequest $
makeJsonApiErrorB "can't parse username and password"
Just AuthLogin {..} -> do ...
YS
data AuthLogin
= AuthLogin
{ authUsername :: Text,
authPassword :: Text,
authRole :: Text
}
deriving (Eq, Show, Read, Generic)
YS
authUsername
), то вот там и валилосьYS
{"username":"test-customer", "password":"12345", "role":"customer"}
Что-то типа такогоR
AV
YS
YS