Skip to content

Commit

Permalink
fixup! loggerにリクエストの詳細を記録
Browse files Browse the repository at this point in the history
  • Loading branch information
MurakawaTakuya committed Jan 20, 2025
1 parent 6b611b8 commit 486d49d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions/src/routers/resultRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ const processGoals = async (
// onlyFinishedの場合のlimitはsuccessをlimitの数返してその期間内のfailedを追加で返す
router.get("/:userId?", async (req: Request, res: Response) => {
const userId = req.params.userId;
logger.info({ message: `GET: result/${userId}`, ...getRequestData(req) });
logger.info({
message: `GET: result/${userId ?? ""}`,
...getRequestData(req),
});

let limit = parseInt(req.query.limit as string) || 10;
if (limit < 1 || limit > 100) {
Expand Down

0 comments on commit 486d49d

Please sign in to comment.