diff options
author | Joris Guyonvarch | 2015-07-20 21:55:52 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-07-20 21:55:52 +0200 |
commit | a271d6034bc4cc631a64476d25d21c83a701fa39 (patch) | |
tree | 89ffa3df69999c5c9ed3cda9f4e4ec04f7a6ae1d /src/server/Main.hs | |
parent | a40c4825996c90d107901b0d71162f9356f1395a (diff) |
Add a payment from the UI, it needs polishing however
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 |