Update sorting of orders in list
This commit is contained in:
parent
e9085d6b9e
commit
da19d4a578
1 changed files with 1 additions and 1 deletions
|
@ -205,7 +205,7 @@ findOrderById :: String -> Action IO (Maybe Document)
|
||||||
findOrderById i = findOne (select ["_id" =: (read i :: B.ObjectId)] "orders")
|
findOrderById i = findOne (select ["_id" =: (read i :: B.ObjectId)] "orders")
|
||||||
|
|
||||||
findAllOrders :: T.Text -> Action IO [Document]
|
findAllOrders :: T.Text -> Action IO [Document]
|
||||||
findAllOrders a = rest =<< find (select ["address" =: a] "orders")
|
findAllOrders a = rest =<< find (select ["address" =: a] "orders") {sort = ["timestamp" =: (negate 1 :: Int)]}
|
||||||
|
|
||||||
deleteOrder :: String -> Action IO ()
|
deleteOrder :: String -> Action IO ()
|
||||||
deleteOrder i = deleteOne (select ["_id" =: (read i :: B.ObjectId)] "orders")
|
deleteOrder i = deleteOne (select ["_id" =: (read i :: B.ObjectId)] "orders")
|
||||||
|
|
Loading…
Reference in a new issue