From 5babf01323bcb62a9880593165af70732f22751b Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 13 Sep 2015 12:04:52 +0200 Subject: Adding income database table with a getter and a setter --- src/server/Main.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/server/Main.hs') diff --git a/src/server/Main.hs b/src/server/Main.hs index 8956fa4..71c4674 100644 --- a/src/server/Main.hs +++ b/src/server/Main.hs @@ -48,9 +48,12 @@ main = do -- Users - get "/users" getUsers - get "/whoAmI" whoAmI - get "/income" getIncome + get "/users" getUsers + get "/whoAmI" whoAmI + get "/income" getIncome + post "/income" $ do + amount <- param "amount" :: ActionM Int + setIncome amount -- Payments -- cgit v1.2.3