summary refs log tree commit diff
path: root/src/api/routes/users/@me/notes.ts
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-01 03:49:51 +0100
committerRory& <root@rory.gay>2026-02-01 03:49:51 +0100
commit98af6066a2d95d7f561ba8887bb941621233018a (patch)
tree207c64552decf83fdf34376f808ac6c0a75cbc0f /src/api/routes/users/@me/notes.ts
parentBump dependencies (node) (diff)
downloadserver-ts-98af6066a2d95d7f561ba8887bb941621233018a.tar.xz
Assert req.params type as solely string (express update)
Diffstat (limited to 'src/api/routes/users/@me/notes.ts')
-rw-r--r--src/api/routes/users/@me/notes.ts4
1 files changed, 2 insertions, 2 deletions
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;