Skip to content

Commit 3fe66af

Browse files
committed
Use middleware
1 parent e8b683e commit 3fe66af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/router/user.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { Router } from "express";
2-
import passport from "passport";
32
import { profile } from "../controller/user.controller";
3+
import { auth } from "../middlewares/auth";
44

55
const router = Router()
66

77

8-
router.use(passport.authenticate('jwt' , {session : false}));
8+
router.use(auth);
99
router.get('/me' , profile);
1010

1111

0 commit comments

Comments
 (0)