diff --git a/sqlx-data.json b/sqlx-data.json index 999c6eed9..0e069cd6a 100644 --- a/sqlx-data.json +++ b/sqlx-data.json @@ -5432,6 +5432,19 @@ }, "query": "\n SELECT name FROM report_types\n " }, + "e37ecb6dc1509d390bb6f68ba25899d19f693554d8969bbf8f8ee14a78adf0f9": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Bool", + "Int8" + ] + } + }, + "query": "\n UPDATE threads\n SET show_in_mod_inbox = $1\n WHERE id = $2\n " + }, "e3cc1fd070b97c4cc36bdb2f33080d4e0d7f3c3d81312d9d28a8c3c8213ad54b": { "describe": { "columns": [], diff --git a/src/routes/v2/reports.rs b/src/routes/v2/reports.rs index 33c69b5c4..5f71bef4d 100644 --- a/src/routes/v2/reports.rs +++ b/src/routes/v2/reports.rs @@ -409,6 +409,18 @@ pub async fn report_edit( ) .execute(&mut *transaction) .await?; + + sqlx::query!( + " + UPDATE threads + SET show_in_mod_inbox = $1 + WHERE id = $2 + ", + !(edit_closed || report.closed), + report.thread_id.0, + ) + .execute(&mut *transaction) + .await?; } transaction.commit().await?;