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 ownerName = do
|
||||
tempOwner <- runDB $ selectFirst [UserName ==. ownerName] []
|
||||
tempOwner <- runDB $ getBy $ UniqueUser ownerName
|
||||
case tempOwner of
|
||||
Just (Entity ownerId _) ->
|
||||
getProfileR ownerId
|
||||
|
|
|
@ -22,6 +22,7 @@ User
|
|||
salted ByteString
|
||||
albums [AlbumId]
|
||||
admin Bool
|
||||
UniqueUser name
|
||||
deriving Typeable Eq Show
|
||||
Activator
|
||||
token Text
|
||||
|
|
Loading…
Reference in a new issue