From 1b93a8e2bb49d74564a6dcc3853b9e2afb1e0ea6 Mon Sep 17 00:00:00 2001 From: ilnaz <237x237@gmail.com> Date: Sun, 19 Jan 2025 10:23:48 +0300 Subject: [PATCH] fix: change get for orders v2 --- server/routers/dry-wash/arm-orders.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/server/routers/dry-wash/arm-orders.js b/server/routers/dry-wash/arm-orders.js index ab10378..97397b1 100644 --- a/server/routers/dry-wash/arm-orders.js +++ b/server/routers/dry-wash/arm-orders.js @@ -1,13 +1,9 @@ const router = require('express').Router() const { OrderModel } = require('./model/order') -router.get('/orders', async (req, res, next) => { - try { +router.post('/orders', async (req, res, next) => { const orders = await OrderModel.find({}) res.status(200).send({ success: true, body: orders }) - } catch (error) { - next(error) - } }) -module.exports = router \ No newline at end of file +module.exports = router