diff options
author | Joris | 2016-08-08 20:58:17 +0200 |
---|---|---|
committer | Joris | 2016-08-08 20:58:17 +0200 |
commit | 8816cf758119a6a2073e561c8df297a833630986 (patch) | |
tree | 20e63f3c0de15945b818a6d7a78359f9134b5e82 /src/server/Main.hs | |
parent | b54d8e45fc8784d8fa6eaa03f58536b7a19cf70b (diff) |
Show incomes in a table and update like payments are updated
Diffstat (limited to 'src/server/Main.hs')
-rw-r--r-- | src/server/Main.hs | 8 |
1 files changed, 5 insertions, 3 deletions
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 |