Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into organizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically authored Oct 2, 2023
2 parents e5855ca + 58a6105 commit 4f8b242
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
12 changes: 12 additions & 0 deletions sqlx-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,18 @@
},
"query": "\n SELECT EXISTS(SELECT 1 FROM mod_follows mf WHERE mf.follower_id = $1 AND mf.mod_id = $2)\n "
},
"10279b5a8383ba8e286f1bfb9a486e3f8b362c46cfc2647c90a83a10e5329569": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Left": [
"Int8"
]
}
},
"query": "\n UPDATE threads\n SET show_in_mod_inbox = FALSE\n WHERE id = $1\n "
},
"1209ffc1ffbea89f7060573275dc7325ac4d7b4885b6c1d1ec92998e6012e455": {
"describe": {
"columns": [],
Expand Down
17 changes: 16 additions & 1 deletion src/routes/v2/projects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,17 @@ pub async fn project_edit(
)
.execute(&mut *transaction)
.await?;

sqlx::query!(
"
UPDATE threads
SET show_in_mod_inbox = FALSE
WHERE id = $1
",
project_item.thread_id as database::models::ids::ThreadId,
)
.execute(&mut *transaction)
.await?;
}

if status.is_approved() && !project_item.inner.status.is_approved() {
Expand Down Expand Up @@ -548,7 +559,11 @@ pub async fn project_edit(
Some(
format!(
"**[{}]({}/user/{})** changed project status from **{}** to **{}**",
user.username, dotenvy::var("SITE_URL")?, user.username, &project_item.inner.status, status
user.username,
dotenvy::var("SITE_URL")?,
user.username,
&project_item.inner.status.as_friendly_str(),
status.as_friendly_str(),
)
.to_string(),
),
Expand Down

0 comments on commit 4f8b242

Please sign in to comment.