Skip to content

Commit

Permalink
fix: change query string type for schedule get api (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
laggu authored Dec 4, 2024
1 parent 688545b commit 0c93dc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/server/src/controllers/v1/schedules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c93dc8

Please sign in to comment.