diff options
author | William Carroll <wpcarro@gmail.com> | 2020-07-25T17·18+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-07-25T17·18+0100 |
commit | d01161656419370032f19fd659e30c349cac93cb (patch) | |
tree | 5aa1c807278531cc143ee335eb39829fbefc39d3 /src/App.hs | |
parent | 718152ec14242a83fa63c5272c7527dbbd928ee2 (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.hs | 8 |
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 |