summary refs log tree commit diff
path: root/src/api/routes/users/@me
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/users/@me')
-rw-r--r--src/api/routes/users/@me/guilds/#guild_id/settings.ts3
-rw-r--r--src/api/routes/users/@me/notes.ts4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/api/routes/users/@me/guilds/#guild_id/settings.ts b/src/api/routes/users/@me/guilds/#guild_id/settings.ts

index 083d5024..72ba0773 100644 --- a/src/api/routes/users/@me/guilds/#guild_id/settings.ts +++ b/src/api/routes/users/@me/guilds/#guild_id/settings.ts
@@ -59,8 +59,9 @@ router.patch( const body = req.body as UserGuildSettingsSchema; if (body.channel_overrides) { + // TODO: rewrite to a single query? for (const channel in body.channel_overrides) { - Channel.findOneOrFail({ where: { id: channel } }); + await Channel.findOneOrFail({ where: { id: channel } }); } } diff --git a/src/api/routes/users/@me/notes.ts b/src/api/routes/users/@me/notes.ts
index 0b174791..3fe1682e 100644 --- a/src/api/routes/users/@me/notes.ts +++ b/src/api/routes/users/@me/notes.ts
@@ -79,9 +79,9 @@ router.put( }, }) ) { - Note.update({ owner: { id: owner.id }, target: { id: target.id } }, { owner, target, content: note }); + await Note.update({ owner: { id: owner.id }, target: { id: target.id } }, { owner, target, content: note }); } else { - Note.insert({ + await Note.insert({ id: Snowflake.generate(), owner, target,