diff options
Diffstat (limited to 'src/api/routes/users/@me/notes.ts')
-rw-r--r-- | src/api/routes/users/@me/notes.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/routes/users/@me/notes.ts b/src/api/routes/users/@me/notes.ts index 64730c1a..f82c3ca1 100644 --- a/src/api/routes/users/@me/notes.ts +++ b/src/api/routes/users/@me/notes.ts @@ -52,17 +52,17 @@ router.put("/:id", route({}), async (req: Request, res: Response) => { where: { owner: { id: owner.id }, target: { id: target.id } }, }) ) { - Note.update( + await Note.update( { owner: { id: owner.id }, target: { id: target.id } }, { owner, target, content: note }, ); } else { - Note.insert({ + await Note.create({ id: Snowflake.generate(), owner, target, content: note, - }); + }).save(); } } else { await Note.delete({ |