mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-26 10:21:51 +00:00
priority inversion, 0 is always first
This commit is contained in:
@@ -56,6 +56,7 @@ import Database.Esqueleto.Experimental
|
||||
( Entity(entityKey, entityVal)
|
||||
, SqlBackend
|
||||
, (^.)
|
||||
, asc
|
||||
, desc
|
||||
, from
|
||||
, orderBy
|
||||
@@ -137,7 +138,7 @@ getInfoR = do
|
||||
name <- getsYesod $ marketplaceName . appSettings
|
||||
allCategories <- runDB $ select $ do
|
||||
cats <- from $ table @Category
|
||||
orderBy [desc (cats ^. CategoryPriority)]
|
||||
orderBy [asc (cats ^. CategoryPriority)]
|
||||
pure cats
|
||||
pure $ InfoRes name $ categoryName . entityVal <$> allCategories
|
||||
|
||||
|
||||
Reference in New Issue
Block a user