Skip to content

Commit

Permalink
feat: enable authorization for /news route
Browse files Browse the repository at this point in the history
  • Loading branch information
swalahamani committed Mar 24, 2024
1 parent 7804449 commit b83e9e4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/api/routes/newsRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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();
Expand All @@ -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(
"/",
Expand Down

0 comments on commit b83e9e4

Please sign in to comment.