about summary refs log tree commit diff
path: root/src/App.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-07-25T17·18+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-07-25T17·18+0100
commitd01161656419370032f19fd659e30c349cac93cb (patch)
tree5aa1c807278531cc143ee335eb39829fbefc39d3 /src/App.hs
parent718152ec14242a83fa63c5272c7527dbbd928ee2 (diff)
Change the name User to Account
Next I'll need to add / remove fields from the Account type.
Diffstat (limited to 'src/App.hs')
-rw-r--r--src/App.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/App.hs b/src/App.hs
index 203d1d073ead..40dc23a303a0 100644
--- a/src/App.hs
+++ b/src/App.hs
@@ -30,9 +30,9 @@ server pool =
     userAddH newUser = liftIO $ userAdd newUser
     userGetH name    = liftIO $ userGet name
 
-    userAdd :: T.User -> IO (Maybe T.Session)
+    userAdd :: T.Account -> IO (Maybe T.Session)
     userAdd newUser = flip runSqlPersistMPool pool $ do
-      exists <- selectFirst [T.UserName ==. (T.userName newUser)] []
+      exists <- selectFirst [T.AccountName ==. (T.accountName newUser)] []
       case exists of
         Nothing -> do
           insert newUser
@@ -42,9 +42,9 @@ server pool =
                                  })
         Just _ -> pure Nothing
 
-    userGet :: Text -> IO (Maybe T.User)
+    userGet :: Text -> IO (Maybe T.Account)
     userGet name = flip runSqlPersistMPool pool $ do
-      mUser <- selectFirst [T.UserName ==. name] []
+      mUser <- selectFirst [T.AccountName ==. name] []
       pure $ entityVal <$> mUser
 
 app :: ConnectionPool -> Application