From 98af6066a2d95d7f561ba8887bb941621233018a Mon Sep 17 00:00:00 2001 From: Rory& Date: Sun, 1 Feb 2026 03:49:51 +0100 Subject: Assert req.params type as solely string (express update) --- src/api/routes/users/@me/notes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api/routes/users/@me/notes.ts') diff --git a/src/api/routes/users/@me/notes.ts b/src/api/routes/users/@me/notes.ts index f25aca79..0b174791 100644 --- a/src/api/routes/users/@me/notes.ts +++ b/src/api/routes/users/@me/notes.ts @@ -35,7 +35,7 @@ router.get( }, }), async (req: Request, res: Response) => { - const { user_id } = req.params; + const { user_id } = req.params as { [key: string]: string }; const note = await Note.findOneOrFail({ where: { @@ -64,7 +64,7 @@ router.put( }, }), async (req: Request, res: Response) => { - const { user_id } = req.params; + const { user_id } = req.params as { [key: string]: string }; const owner = req.user; const target = await User.findOneOrFail({ where: { id: user_id } }); //if noted user does not exist throw const { note } = req.body; -- cgit 1.5.1