adds name to /package/data

This commit is contained in:
Keagan McClelland
2022-02-02 11:12:21 -07:00
parent 139ba20e2f
commit 0d7fab5789
6 changed files with 17 additions and 16 deletions

View File

@@ -129,13 +129,14 @@ import Yesod.Core ( MonadResource
import Yesod.Persist ( YesodDB )
import Yesod.Persist.Core ( YesodPersist(runDB) )
getCategoriesR :: Handler CategoryRes
getCategoriesR = do
getInfoR :: Handler InfoRes
getInfoR = do
name <- getsYesod $ marketplaceName . appSettings
allCategories <- runDB $ select $ do
cats <- from $ table @Category
orderBy [desc (cats ^. CategoryPriority)]
pure cats
pure $ CategoryRes $ categoryName . entityVal <$> allCategories
pure $ InfoRes name $ categoryName . entityVal <$> allCategories
getEosVersionR :: Handler EosRes
getEosVersionR = do