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