diff options
Diffstat (limited to 'src/server/Main.hs')
-rw-r--r-- | src/server/Main.hs | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/server/Main.hs b/src/server/Main.hs index 8a77598..27908b4 100644 --- a/src/server/Main.hs +++ b/src/server/Main.hs @@ -10,6 +10,7 @@ import qualified Data.Text.IO as TIO import Controller.Index import Controller.SignIn import Controller.Payment +import Controller.User import Model.Database (runMigrations) @@ -39,8 +40,14 @@ main = do token <- param "token" :: ActionM Text validateSignInAction config token - get "/userName" $ - getUserName + post "/signOut" $ + signOutAction + + get "/whoAmI" $ + whoAmIAction + + get "/users" $ do + getUsersAction get "/payments" $ do page <- param "page" :: ActionM Int @@ -61,15 +68,3 @@ main = do get "/payments/count" $ do getPaymentsCountAction - - post "/signOut" $ - signOutAction - - get "/users" getUsersAction - post "/user/add" $ do - email <- param "email" :: ActionM Text - name <- param "name" :: ActionM Text - addUserAction email name - post "/user/delete" $ do - email <- param "email" :: ActionM Text - deleteUserAction email |