added uniqueUser
This commit is contained in:
parent
5c6ff28132
commit
4557157a4f
2 changed files with 2 additions and 1 deletions
|
@ -52,7 +52,7 @@ getProfileR ownerId = do
|
||||||
|
|
||||||
getUserR :: Text -> Handler Html
|
getUserR :: Text -> Handler Html
|
||||||
getUserR ownerName = do
|
getUserR ownerName = do
|
||||||
tempOwner <- runDB $ selectFirst [UserName ==. ownerName] []
|
tempOwner <- runDB $ getBy $ UniqueUser ownerName
|
||||||
case tempOwner of
|
case tempOwner of
|
||||||
Just (Entity ownerId _) ->
|
Just (Entity ownerId _) ->
|
||||||
getProfileR ownerId
|
getProfileR ownerId
|
||||||
|
|
|
@ -22,6 +22,7 @@ User
|
||||||
salted ByteString
|
salted ByteString
|
||||||
albums [AlbumId]
|
albums [AlbumId]
|
||||||
admin Bool
|
admin Bool
|
||||||
|
UniqueUser name
|
||||||
deriving Typeable Eq Show
|
deriving Typeable Eq Show
|
||||||
Activator
|
Activator
|
||||||
token Text
|
token Text
|
||||||
|
|
Loading…
Reference in a new issue