master^2
Varun 3 months ago
parent 7cb64748c1
commit 4bdd4bcd9d

@ -1123,31 +1123,33 @@ fastify.get("/api/cart/:customerId", {
fastify.route({ fastify.route({
method: "POST", method: "GET",
url: "/api/getuserOrders/:customerId", url: "/api/getuserOrders/:customerId",
schema: { schema: {
description: "To Get orders of customer", description: "To Get orders of customer",
tags: ["User"], tags: ["User"],
summary: "This is for Geting orders of customer", summary: "This is for getting orders of a customer",
params: { params: {
type: "object", type: "object",
properties: { properties: {
customerId: { customerId: {
type: "string", type: "string",
description: "customerId", description: "Customer ID",
},
},
}, },
security: [
{
basicAuth: [],
},
],
}, },
//preHandler: fastify.auth([fastify.authenticate]), required: ["customerId"]
handler: userController.getuserOrders, },
}); security: [
{
basicAuth: [],
},
],
},
// preHandler: fastify.auth([fastify.authenticate]),
handler: userController.getuserOrders,
});
next(); next();

Loading…
Cancel
Save