From 3f8db59d33373a9c662101a644b33bfaa2baad45 Mon Sep 17 00:00:00 2001 From: varun Date: Mon, 24 Apr 2023 06:49:24 -0400 Subject: [PATCH] made changes in supplier routes --- src/routes/supplierRoute.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/routes/supplierRoute.js b/src/routes/supplierRoute.js index afc5261b..ce466b71 100644 --- a/src/routes/supplierRoute.js +++ b/src/routes/supplierRoute.js @@ -53,6 +53,7 @@ module.exports = function (fastify, opts, next) { }, ], }, + preHandler: fastify.auth([fastify.authenticate]), handler: validationHandler.getConnectedSuppliers, }); @@ -78,6 +79,7 @@ module.exports = function (fastify, opts, next) { }, ], }, + preHandler: fastify.auth([fastify.authenticate]), handler: validationHandler.getPendingSuppliers, }); @@ -102,6 +104,7 @@ module.exports = function (fastify, opts, next) { }, ], }, + preHandler: fastify.auth([fastify.authenticate]), handler: validationHandler.getRejectSuppliers, }); @@ -128,6 +131,7 @@ module.exports = function (fastify, opts, next) { }, ], }, + preHandler: fastify.auth([fastify.authenticate]), handler: validationHandler.getRejectCustomers, }); @@ -153,6 +157,7 @@ module.exports = function (fastify, opts, next) { }, ], }, + preHandler: fastify.auth([fastify.authenticate]), handler: validationHandler.getPendingCustomers, }); @@ -179,6 +184,7 @@ module.exports = function (fastify, opts, next) { }, ], }, + preHandler: fastify.auth([fastify.authenticate]), handler: validationHandler.getconnectedCustomers, });