Hash passwords when creating accounts
TL;DR:
- introduce the Cryptonite library
- Remove the redundant language extensions, imports, deps from Persistent
- Prefer NoContent return type for POST /accounts
- Define custom {To,From}JSON instances for Role
This commit is contained in:
parent
bb36dd1f9e
commit
b170be9375
4 changed files with 76 additions and 52 deletions
|
|
@ -12,8 +12,8 @@ import qualified Types as T
|
|||
type API =
|
||||
-- accounts: Create
|
||||
"accounts"
|
||||
:> ReqBody '[JSON] T.Account
|
||||
:> Post '[JSON] (Maybe T.Session)
|
||||
:> ReqBody '[JSON] T.CreateAccountRequest
|
||||
:> Post '[JSON] NoContent
|
||||
-- accounts: Read
|
||||
-- accounts: Update
|
||||
-- accounts: Delete
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue