mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-30 11:51:57 +00:00
add priority to order categories
This commit is contained in:
committed by
Keagan McClelland
parent
0d27703b33
commit
d53262e143
@@ -150,7 +150,10 @@ instance ToTypedContent EosRes where
|
||||
|
||||
getCategoriesR :: Handler CategoryRes
|
||||
getCategoriesR = do
|
||||
allCategories <- runDB $ select $ do from $ table @Category
|
||||
allCategories <- runDB $ select $ do
|
||||
cats <- from $ table @Category
|
||||
orderBy [desc (cats ^. CategoryPriority)]
|
||||
pure cats
|
||||
pure $ CategoryRes $ categoryName . entityVal <$>allCategories
|
||||
|
||||
getEosR :: Handler EosRes
|
||||
|
||||
Reference in New Issue
Block a user