diff options
author | Joris | 2017-11-07 09:43:25 +0100 |
---|---|---|
committer | Joris | 2017-11-07 09:43:25 +0100 |
commit | 903108a3b64758fa58783878756931e6cf187e53 (patch) | |
tree | b5a311c327ac8363912dc2da2fc16acc82526bb1 /src/server/Model/User.hs | |
parent | 898e7ed11ab0958fcdaf65b99b33f7b04787630a (diff) |
Reformat payment queries
Diffstat (limited to 'src/server/Model/User.hs')
-rw-r--r-- | src/server/Model/User.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/Model/User.hs b/src/server/Model/User.hs index eb78a69..e14fcef 100644 --- a/src/server/Model/User.hs +++ b/src/server/Model/User.hs @@ -4,8 +4,8 @@ module Model.User ( list , get - , createUser - , deleteUser + , create + , delete ) where import Data.Maybe (listToMaybe) @@ -31,8 +31,8 @@ get userEmail = SQLite.query conn "SELECT * FROM user WHERE email = ? LIMIT 1" (Only userEmail) ) -createUser :: Text -> Text -> Query UserId -createUser userEmail userName = +create :: Text -> Text -> Query UserId +create userEmail userName = Query (\conn -> do now <- getCurrentTime SQLite.execute @@ -42,8 +42,8 @@ createUser userEmail userName = SQLite.lastInsertRowId conn ) -deleteUser :: Text -> Query () -deleteUser userEmail = +delete :: Text -> Query () +delete userEmail = Query (\conn -> SQLite.execute conn "DELETE FROM user WHERE email = ?" (Only userEmail) ) |