mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-30 19:54:47 +00:00
add priority to order categories
This commit is contained in:
committed by
Keagan McClelland
parent
a42c5c5caa
commit
0e60b500ec
@@ -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