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, });