about summary refs log tree commit diff
path: root/src/API.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-07-28T13·15+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-07-28T13·15+0100
commitb3556648582c02fb5a9a10a6a4525e212397f945 (patch)
tree45632fe6d63b642ab97aff0f7307f86eaa9cd0ca /src/API.hs
parentb170be937532cf976746a50f26b05ff34c4c9c00 (diff)
Support /login
Support basic authentication.

Note the TODOs that this commit introduces to track some of the remaining work.
Diffstat (limited to 'src/API.hs')
-rw-r--r--src/API.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/API.hs b/src/API.hs
index 134d278426d6..9ae618cd3029 100644
--- a/src/API.hs
+++ b/src/API.hs
@@ -37,3 +37,8 @@ type API =
       -- trips: List
       :<|> "trips"
            :> Get '[JSON] [T.Trip]
+
+      -- Miscellaneous
+      :<|> "login"
+           :> ReqBody '[JSON] T.AccountCredentials
+           :> Post '[JSON] (Maybe T.Session)