Add sorting to items list
This commit is contained in:
parent
54a8c2e183
commit
ebf3d2ce25
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue