diff options
Diffstat (limited to 'src/server/Main.hs')
-rw-r--r-- | src/server/Main.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/Main.hs b/src/server/Main.hs index 7fd42a7..d534c4e 100644 --- a/src/server/Main.hs +++ b/src/server/Main.hs @@ -29,12 +29,17 @@ main = do token <- param "token" :: ActionM Text validateSignInAction token - post "/signOut" $ - signOutAction - get "/payments" $ getPaymentsAction + post "/payment/add" $ do + name <- param "name" :: ActionM Text + cost <- param "cost" :: ActionM Int + createPaymentAction name cost + + post "/signOut" $ + signOutAction + get "/users" getUsersAction post "/user/add" $ do email <- param "email" :: ActionM Text @@ -43,8 +48,3 @@ main = do post "/user/delete" $ do email <- param "email" :: ActionM Text deleteUserAction email - post "/payment/add" $ do - email <- param "email" :: ActionM Text - name <- param "name" :: ActionM Text - cost <- param "cost" :: ActionM Int - createPaymentAction email name cost |