Restructure guilds table
This commit is contained in:
@ -31,7 +31,7 @@ pub async fn get_reminder_templates(
|
||||
|
||||
match sqlx::query_as_unchecked!(
|
||||
ReminderTemplate,
|
||||
"SELECT * FROM reminder_template WHERE guild_id = (SELECT id FROM guilds WHERE guild = ?)",
|
||||
"SELECT * FROM reminder_template WHERE guild_id = ?",
|
||||
id
|
||||
)
|
||||
.fetch_all(pool.inner())
|
||||
@ -87,7 +87,7 @@ pub async fn delete_reminder_template(
|
||||
check_authorization(cookies, ctx.inner(), id).await?;
|
||||
|
||||
match sqlx::query!(
|
||||
"DELETE FROM reminder_template WHERE guild_id = (SELECT id FROM guilds WHERE guild = ?) AND id = ?",
|
||||
"DELETE FROM reminder_template WHERE guild_id = ? AND id = ?",
|
||||
id, delete_reminder_template.id
|
||||
)
|
||||
.fetch_all(pool.inner())
|
||||
|
Reference in New Issue
Block a user