From 8816cf758119a6a2073e561c8df297a833630986 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 8 Aug 2016 20:58:17 +0200 Subject: Show incomes in a table and update like payments are updated --- src/server/Main.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/server/Main.hs') diff --git a/src/server/Main.hs b/src/server/Main.hs index 19d78b3..4636674 100644 --- a/src/server/Main.hs +++ b/src/server/Main.hs @@ -15,7 +15,7 @@ import qualified Data.Text.IO as T import Controller.Index import Controller.SignIn import Controller.Payment as Payment -import Controller.Income +import Controller.Income as Income import Model.Database (runMigrations) @@ -62,8 +62,10 @@ main = do -- Incomes - post "/income" $ jsonData >>= createIncome + post "/income" $ jsonData >>= Income.create + + put "/income" $ jsonData >>= Income.editOwn delete "/income" $ do incomeId <- param "id" :: ActionM Text - deleteOwnIncome incomeId + Income.deleteOwn incomeId -- cgit v1.2.3