File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import expressUtil from "@util/expressUtil";
9
9
import { iRequest , iResponse , RouteType } from "@customTypes/expressTypes" ;
10
10
import { MultiAnnotation } from "@customTypes/appDataTypes/annotationTypes" ;
11
11
import AnnotationService from "@services/AnnotationService" ;
12
+ import middlewares from "@api/middlewares" ;
12
13
13
14
const route = Router ( ) ;
14
15
const annotationService = new AnnotationService ( ) ;
@@ -20,7 +21,7 @@ const annotationsRoute: RouteType = (apiRouter) => {
20
21
Registering isAuthorized middleware to the entire /users route
21
22
as all the endpoint in this route needs authorization.
22
23
*/
23
- // route.use(middlewares.isAuthorized);
24
+ route . use ( middlewares . isAuthorized ) ;
24
25
25
26
route . get (
26
27
"/" ,
Original file line number Diff line number Diff line change @@ -15,13 +15,14 @@ import {
15
15
import {
16
16
iNewsAnnotationsInputDTO ,
17
17
iNewsSubmissionDTO ,
18
- } from "customTypes/appDataTypes/newsTypes" ;
18
+ } from "@ customTypes/appDataTypes/newsTypes" ;
19
19
import { celebrate , Segments } from "celebrate" ;
20
20
import {
21
21
newsAnnotationBodySchema ,
22
22
newsSubmissionBodySchema ,
23
- } from "validations/newsRouteSchemas" ;
24
- import NewsService from "services/NewsService" ;
23
+ } from "@validations/newsRouteSchemas" ;
24
+ import NewsService from "@services/NewsService" ;
25
+ import middlewares from "@api/middlewares" ;
25
26
26
27
const route = Router ( ) ;
27
28
const newsService = new NewsService ( ) ;
@@ -33,7 +34,7 @@ const newsRoute: RouteType = (apiRouter) => {
33
34
Registering isAuthorized middleware to the entire /users route
34
35
as all the endpoint in this route needs authorization.
35
36
*/
36
- // route.use(middlewares.isAuthorized);
37
+ route . use ( middlewares . isAuthorized ) ;
37
38
38
39
route . post (
39
40
"/" ,
You can’t perform that action at this time.
0 commit comments