From 214f2f6af7d2c6337602ced7228acd0d21b8f89d Mon Sep 17 00:00:00 2001 From: laggu91 Date: Mon, 2 Dec 2024 23:38:30 +0900 Subject: [PATCH] fix: change query string type for schedule get api --- apps/server/src/controllers/v1/schedules.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/server/src/controllers/v1/schedules.ts b/apps/server/src/controllers/v1/schedules.ts index c58cbab..80bb49c 100644 --- a/apps/server/src/controllers/v1/schedules.ts +++ b/apps/server/src/controllers/v1/schedules.ts @@ -26,13 +26,13 @@ router.post('/', async (req: Request, res: Response) => { // todo: jwt 에서 user의 identifier 추출 후 미들웨어로 포함 router.get('/', async (req: Request, res: Response) => { const options = { - page: req.query.page || 0, - limit: req.query.limit || 100, + page: Number(req.query.page) || 0, + limit: Number(req.query.limit) || 100, } const filterOption = { - from: req.query.from || new Date(0), - to: req.query.to || new Date(), + from: new Date(req.query.from as string) || new Date(0), + to: new Date(req.query.to as string) || new Date(), } const userId = req.body.userId