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 orders = await OrderModel.find({
|
||||
startWashTime: {
|
||||
$gte: start,
|
||||
$lt: end,
|
||||
},
|
||||
$or: [
|
||||
{ startWashTime: { $lt: end }, endWashTime: { $gt: start } }
|
||||
]
|
||||
});
|
||||
|
||||
const mastersWithOrders = masters.map((master) => {
|
||||
|
Loading…
Reference in New Issue
Block a user