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

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