summary refs log tree commit diff
path: root/src/api/routes/users/@me/notes.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/users/@me/notes.ts')
-rw-r--r--src/api/routes/users/@me/notes.ts6
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 87d45277..07c07d72 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({