Add sorting to items list

This commit is contained in:
Rene Vergara 2022-07-14 10:09:15 -05:00
parent 54a8c2e183
commit ebf3d2ce25
Signed by: pitmutt
GPG Key ID: 65122AD495A7F5B2
1 changed files with 2 additions and 1 deletions

View File

@ -84,7 +84,8 @@ instance Val Item where
-- Database actions
findItems :: T.Text -> Action IO [Document]
findItems a = rest =<< find (select ["owner" =: a] "items")
findItems a =
rest =<< find (select ["owner" =: a] "items") {sort = ["name" =: (1 :: Int)]}
upsertItem :: Item -> Action IO ()
upsertItem i = do