From b83e9e4878dc5f20a0178f1ab7c2f0d92eff4ad1 Mon Sep 17 00:00:00 2001 From: Muhammad Swalah A A Date: Sun, 24 Mar 2024 12:09:48 +0530 Subject: [PATCH] feat: enable authorization for /news route --- src/api/routes/newsRoute.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/api/routes/newsRoute.ts b/src/api/routes/newsRoute.ts index 1fe3f02..4b9837e 100644 --- a/src/api/routes/newsRoute.ts +++ b/src/api/routes/newsRoute.ts @@ -2,8 +2,6 @@ import {NextFunction, Router} from "express"; import logger from "@loaders/logger"; -// import middlewares from "@api/middlewares"; - import expressUtil from "@util/expressUtil"; import { @@ -22,7 +20,7 @@ import { newsSubmissionBodySchema, } from "@validations/newsRouteSchemas"; import NewsService from "@services/NewsService"; -// import middlewares from "@api/middlewares"; +import middlewares from "@api/middlewares"; const route = Router(); const newsService = new NewsService(); @@ -34,7 +32,7 @@ const newsRoute: RouteType = (apiRouter) => { Registering isAuthorized middleware to the entire /users route as all the endpoint in this route needs authorization. */ - // route.use(middlewares.isAuthorized); + route.use(middlewares.isAuthorized); route.post( "/",