From 9f7813622d7c3708c272ea8a8ce7bc2479e5cfdb Mon Sep 17 00:00:00 2001 From: Jai A Date: Sun, 7 Mar 2021 20:46:04 -0700 Subject: [PATCH] Fix team invites --- sqlx-data.json | 29 ++++++++++++------------ src/database/models/notification_item.rs | 5 ++-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/sqlx-data.json b/sqlx-data.json index b2874afc1..9df895abf 100644 --- a/sqlx-data.json +++ b/sqlx-data.json @@ -2726,6 +2726,21 @@ ] } }, + "8129255d25bf0624d83f50558b668ed7b7f9c264e380d276522fc82bc871939b": { + "query": "\n INSERT INTO notifications_actions (\n notification_id, title, action_route, action_route_method\n )\n VALUES (\n $1, $2, $3, $4\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Varchar", + "Varchar", + "Varchar" + ] + }, + "nullable": [] + } + }, "82515e4e7e88f1193c956f032caabc70f535f925e212de30f974afd3ec126092": { "query": "\n INSERT INTO licenses (short, name)\n VALUES ($1, $2)\n ON CONFLICT (short) DO NOTHING\n RETURNING id\n ", "describe": { @@ -4010,20 +4025,6 @@ ] } }, - "ca1574164dfb16ccee0a1f0468760903453632a5c38dbc64aa667a8ee6086c47": { - "query": "\n INSERT INTO notifications_actions (\n notification_id, title, action_route\n )\n VALUES (\n $1, $2, $3\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Varchar", - "Varchar" - ] - }, - "nullable": [] - } - }, "ca52197b89fcc61f131b0937d642133ae19903d183f84513601e16ee7f3df7d8": { "query": "\n SELECT id FROM mods\n WHERE LOWER(slug) = LOWER($1)\n ", "describe": { diff --git a/src/database/models/notification_item.rs b/src/database/models/notification_item.rs index d4a0369c7..fec14e5ad 100644 --- a/src/database/models/notification_item.rs +++ b/src/database/models/notification_item.rs @@ -314,15 +314,16 @@ impl NotificationAction { sqlx::query!( " INSERT INTO notifications_actions ( - notification_id, title, action_route + notification_id, title, action_route, action_route_method ) VALUES ( - $1, $2, $3 + $1, $2, $3, $4 ) ", self.notification_id as NotificationId, &self.title, &self.action_route, + &self.action_route_method ) .execute(&mut *transaction) .await?;