From ebf3d2ce25bc1e550ac0d0bfe0eeb70947464c0a Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Thu, 14 Jul 2022 10:09:15 -0500 Subject: [PATCH] Add sorting to items list --- src/Item.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Item.hs b/src/Item.hs index 95b18b2..6fef76e 100644 --- a/src/Item.hs +++ b/src/Item.hs @@ -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