about summary refs log tree commit diff
path: root/src/API.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-07-28T11·49+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-07-28T11·51+0100
commitb170be937532cf976746a50f26b05ff34c4c9c00 (patch)
tree3230276044f02c87d14642ec6636d653e40104b1 /src/API.hs
parentbb36dd1f9e7dfaa806fbda1317b9e53aed49b4ea (diff)
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
Diffstat (limited to 'src/API.hs')
-rw-r--r--src/API.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/API.hs b/src/API.hs
index 95b9f14a399c..134d278426d6 100644
--- a/src/API.hs
+++ b/src/API.hs
@@ -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