feat: rewrite the request to receive orders from the masters
This commit is contained in:
parent
775f24cffa
commit
a63a229b64
@ -16,10 +16,9 @@ router.post("/masters/list", async (req, res, next) => {
|
|||||||
const masters = await MasterModel.find({});
|
const masters = await MasterModel.find({});
|
||||||
|
|
||||||
const orders = await OrderModel.find({
|
const orders = await OrderModel.find({
|
||||||
startWashTime: {
|
$or: [
|
||||||
$gte: start,
|
{ startWashTime: { $lt: end }, endWashTime: { $gt: start } }
|
||||||
$lt: end,
|
]
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const mastersWithOrders = masters.map((master) => {
|
const mastersWithOrders = masters.map((master) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user