about summary refs log tree commit diff
path: root/assessments/tt/src/API.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2021-01-22T11·13+0000
committerWilliam Carroll <wpcarro@gmail.com>2021-01-22T11·13+0000
commit42ba9cce79852f992302df92cb7ab61a08a53fb3 (patch)
treea1903f7f74985c23b35622920cf3866da1a1f7c0 /assessments/tt/src/API.hs
parente326b0da45a948668f523d5f715660981a9874c2 (diff)
Prefer POST /verify to GET /verify
To make things easier for testing, I setup the /verify endpoint as a GET, so
that I could email myself clickable URLs. With POST /verify, my options are:
- send email with an HTML button and form that POSTs to /verify
- email myself the curl instruction

I'm preferring the latter for now...
Diffstat (limited to 'assessments/tt/src/API.hs')
-rw-r--r--assessments/tt/src/API.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/assessments/tt/src/API.hs b/assessments/tt/src/API.hs
index 4c67896e2448..471fa761e0f4 100644
--- a/assessments/tt/src/API.hs
+++ b/assessments/tt/src/API.hs
@@ -20,9 +20,8 @@ type API =
            :> ReqBody '[JSON] T.CreateAccountRequest
            :> Post '[JSON] NoContent
       :<|> "verify"
-           :> QueryParam' '[Required] "username" Text
-           :> QueryParam' '[Required] "secret" T.RegistrationSecret
-           :> Get '[JSON] NoContent
+           :> ReqBody '[JSON] T.VerifyAccountRequest
+           :> Post '[JSON] NoContent
       -- accounts: Read
       -- accounts: Update
       -- accounts: Delete