about summary refs log tree commit diff
path: root/src/API.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/API.hs')
-rw-r--r--src/API.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/API.hs b/src/API.hs
index a42bf804b471..545aa25be777 100644
--- a/src/API.hs
+++ b/src/API.hs
@@ -14,10 +14,15 @@ type API = "user"
            :> Post '[JSON] (Maybe T.Session)
       :<|> "user"
            :> Capture "name" Text
-           :> Get  '[JSON] (Maybe T.Account)
-      :<|> "trip"
+           :> Get '[JSON] (Maybe T.Account)
+      -- Create
+      :<|> "trips"
            :> ReqBody '[JSON] T.Trip
            :> Post '[JSON] NoContent
       -- Read
       :<|> "trips"
            :> Get '[JSON] [T.Trip]
+      -- Delete
+      :<|> "trips"
+           :> ReqBody '[JSON] T.TripPK
+           :> Delete '[JSON] NoContent