summary refs log tree commit diff
path: root/src/api/routes/users/@me/notes.ts
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-18 01:24:37 +0100
committerRory& <root@rory.gay>2025-12-18 01:24:37 +0100
commite2de706abff59381754ead6887bbe5fd324274fa (patch)
tree55e7fdd506b3f03affe02413bec185e25a413c46 /src/api/routes/users/@me/notes.ts
parentTry traces again (diff)
downloadserver-ts-e2de706abff59381754ead6887bbe5fd324274fa.tar.xz
Avoid re-fetching user if not requesting extra fields
Diffstat (limited to 'src/api/routes/users/@me/notes.ts')
-rw-r--r--src/api/routes/users/@me/notes.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/users/@me/notes.ts b/src/api/routes/users/@me/notes.ts

index 8cd33304..f25aca79 100644 --- a/src/api/routes/users/@me/notes.ts +++ b/src/api/routes/users/@me/notes.ts
@@ -65,7 +65,7 @@ router.put( }), async (req: Request, res: Response) => { const { user_id } = req.params; - const owner = await User.findOneOrFail({ where: { id: req.user_id } }); + const owner = req.user; const target = await User.findOneOrFail({ where: { id: user_id } }); //if noted user does not exist throw const { note } = req.body;