cancle order

master
Bhaskara Kishore 2 years ago
parent 5dcc261c20
commit a1aecd71c5

@ -625,9 +625,9 @@ exports.getAllOrderreject = async (req, reply) => {
const limit = parseInt(req.query.limit) || 100; const limit = parseInt(req.query.limit) || 100;
const page = parseInt(req.query.page) || 1; const page = parseInt(req.query.page) || 1;
const startindex = (page - 1) * limit; const startindex = (page - 1) * limit;
const customerId = req.params.customerId //const customerId = req.params.customerId
try { try {
await Tankerbooking.find({ customerId: customerId, orderStatus: ["rejected"]}) await Tankerbooking.find({ orderStatus: ["rejected"]})
.limit(limit) .limit(limit)
.skip(startindex) .skip(startindex)
.exec() .exec()

@ -506,16 +506,16 @@ module.exports = function (fastify, opts, next) {
tags: ["Supplier-Order"], tags: ["Supplier-Order"],
description:"This is for Get All order cancelled", description:"This is for Get All order cancelled",
summary: "This is for Get All order cancelled", summary: "This is for Get All order cancelled",
params: { // params: {
required: ["customerId"], // required: ["customerId"],
type: "object", // type: "object",
properties: { // properties: {
customerId: { // customerId: {
type: "string", // type: "string",
description: "customerId", // description: "customerId",
}, // },
}, // },
}, // },
security: [ security: [
{ {

Loading…
Cancel
Save