You've already forked AstralRinth
forked from didirus/AstralRinth
Queue Dates + Warnings, some cleanup (#549)
* Queue Dates + Warnings, some cleanup * Fix ping * Fix repeated discord messaging * Fix compile error + run fmt
This commit is contained in:
@@ -256,12 +256,13 @@ pub async fn dependency_list(
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let dep_version_ids = dependencies
|
||||
.iter()
|
||||
.filter_map(|x| x.0)
|
||||
.collect::<Vec<database::models::VersionId>>();
|
||||
let (projects_result, versions_result) = futures::future::try_join(
|
||||
database::Project::get_many_full(&project_ids, &**pool),
|
||||
database::Version::get_many_full(
|
||||
dependencies.iter().filter_map(|x| x.0).collect(),
|
||||
&**pool,
|
||||
),
|
||||
database::Version::get_many_full(&dep_version_ids, &**pool),
|
||||
)
|
||||
.await?;
|
||||
|
||||
@@ -502,18 +503,7 @@ pub async fn project_edit(
|
||||
sqlx::query!(
|
||||
"
|
||||
UPDATE mods
|
||||
SET moderation_message = NULL
|
||||
WHERE (id = $1)
|
||||
",
|
||||
id as database::models::ids::ProjectId,
|
||||
)
|
||||
.execute(&mut *transaction)
|
||||
.await?;
|
||||
|
||||
sqlx::query!(
|
||||
"
|
||||
UPDATE mods
|
||||
SET moderation_message_body = NULL
|
||||
SET moderation_message = NULL, moderation_message_body = NULL, queued = NOW()
|
||||
WHERE (id = $1)
|
||||
",
|
||||
id as database::models::ids::ProjectId,
|
||||
@@ -528,6 +518,7 @@ pub async fn project_edit(
|
||||
project_item.inner.id.into(),
|
||||
&pool,
|
||||
webhook_url,
|
||||
None,
|
||||
)
|
||||
.await
|
||||
.ok();
|
||||
@@ -557,6 +548,7 @@ pub async fn project_edit(
|
||||
project_item.inner.id.into(),
|
||||
&pool,
|
||||
webhook_url,
|
||||
None,
|
||||
)
|
||||
.await
|
||||
.ok();
|
||||
@@ -1234,9 +1226,12 @@ pub async fn projects_edit(
|
||||
)));
|
||||
}
|
||||
|
||||
let team_ids = projects_data
|
||||
.iter()
|
||||
.map(|x| x.inner.team_id)
|
||||
.collect::<Vec<database::models::TeamId>>();
|
||||
let team_members = database::models::TeamMember::get_from_team_full_many(
|
||||
projects_data.iter().map(|x| x.inner.team_id).collect(),
|
||||
&**pool,
|
||||
&team_ids, &**pool,
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user