changed order
This commit is contained in:
parent
3ab4b2ba4f
commit
1684e2c3f9
4 changed files with 5 additions and 5 deletions
|
@ -14,7 +14,7 @@ getAdminAlbumsR = do
|
|||
user <- runDB $ getJust userId
|
||||
case userAdmin user of
|
||||
True -> do
|
||||
albums <- runDB $ selectList [] [Desc AlbumTitle]
|
||||
albums <- runDB $ selectList [] [Asc AlbumTitle]
|
||||
defaultLayout $ do
|
||||
$(widgetFile "adminAlbums")
|
||||
False -> do
|
||||
|
@ -36,7 +36,7 @@ getAdminAlbumMediaR albumId = do
|
|||
tempAlbum <- runDB $ get albumId
|
||||
case tempAlbum of
|
||||
Just album -> do
|
||||
media <- runDB $ selectList [MediumAlbum ==. albumId] [Desc MediumTitle]
|
||||
media <- runDB $ selectList [MediumAlbum ==. albumId] [Asc MediumTitle]
|
||||
defaultLayout $ do
|
||||
$(widgetFile "adminAlbumMedia")
|
||||
Nothing -> do
|
||||
|
|
|
@ -14,7 +14,7 @@ getAdminMediaR = do
|
|||
user <- runDB $ getJust userId
|
||||
case userAdmin user of
|
||||
True -> do
|
||||
media <- runDB $ selectList [] [Desc MediumTitle]
|
||||
media <- runDB $ selectList [] [Asc MediumTitle]
|
||||
defaultLayout $ do
|
||||
$(widgetFile "adminMedia")
|
||||
False -> do
|
||||
|
|
|
@ -8,7 +8,7 @@ getProfileR :: UserId -> Handler Html
|
|||
getProfileR ownerId = do
|
||||
owner <- runDB $ get ownerId
|
||||
ownerSlug <- lift $ pure $ userSlug $ fromJust owner
|
||||
userAlbs <- runDB $ selectList [AlbumOwner ==. ownerId] [Desc AlbumTitle]
|
||||
userAlbs <- runDB $ selectList [AlbumOwner ==. ownerId] [Asc AlbumTitle]
|
||||
recentMedia <- (runDB $ selectList [MediumOwner ==. ownerId] [Desc MediumTime])
|
||||
msu <- lookupSession "userId"
|
||||
presence <- case msu of
|
||||
|
|
|
@ -5,7 +5,7 @@ import Data.Maybe
|
|||
|
||||
getTagR :: Text -> Handler Html
|
||||
getTagR tag = do
|
||||
tempMedia <- runDB $ selectList [] [Desc MediumTitle]
|
||||
tempMedia <- runDB $ selectList [] [Asc MediumTitle]
|
||||
almostMedia <- mapM (\a -> do
|
||||
case tag `elem` (mediumTags $ entityVal a) of
|
||||
True -> return (Just a)
|
||||
|
|
Loading…
Reference in a new issue