Commit fa1a73b5 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

order make order desc

parent c4c49ffc
...@@ -11,6 +11,7 @@ const OrderController = { ...@@ -11,6 +11,7 @@ const OrderController = {
try { try {
const order = await db.order.findMany({ const order = await db.order.findMany({
where: { user_id: Number(req.user.id) }, where: { user_id: Number(req.user.id) },
orderBy: {id: "desc"}
}); });
res.json(order); res.json(order);
} catch (err) { } catch (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment