From 6287d3f4d817239dcbb93e5ff11d2ba7b5116db7 Mon Sep 17 00:00:00 2001 From: rca Date: Sun, 16 Jun 2024 15:24:21 +0900 Subject: [PATCH] =?UTF-8?q?debugRouter=E3=81=AB=E6=A4=9C=E8=A8=BC=E7=94=A8?= =?UTF-8?q?=E3=82=A8=E3=83=B3=E3=83=89=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routers/debugRouter.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/routers/debugRouter.ts b/src/routers/debugRouter.ts index 98f77f2..d3b3df9 100644 --- a/src/routers/debugRouter.ts +++ b/src/routers/debugRouter.ts @@ -1,4 +1,5 @@ import { Router, Request, Response } from 'express'; +import verifyToken from '@middlewares/verifyToken'; const router = Router(); @@ -6,6 +7,10 @@ router.get('/hello', (req: Request, res: Response) => { res.send('Hello, World!'); }); +router.get('/protected', verifyToken,(req: Request, res: Response) => { + res.send('You are authorized to access this endpoint'); +}); + router.post('/echo', (req: Request, res: Response) => { res.json( {