You've already forked AstralRinth
forked from didirus/AstralRinth
fix(labrinth): ensure versions get removed from search indexes before ending route execution (#3789)
* fix(labrinth): ensure versions get removed from search indexes before ending route execution * chore: run `sqlx prepare` * chore(labrinth): simplify `remove_documents` a little * chore: tweak new comment
This commit is contained in:
committed by
GitHub
parent
5bdff3929b
commit
97e4d8e132
File diff suppressed because it is too large
Load Diff
@@ -958,7 +958,7 @@ pub async fn version_delete(
|
||||
)
|
||||
.await?;
|
||||
transaction.commit().await?;
|
||||
remove_documents(&[version.inner.id.into()], &search_config).await?;
|
||||
|
||||
database::models::DBProject::clear_cache(
|
||||
version.inner.project_id,
|
||||
None,
|
||||
@@ -966,6 +966,7 @@ pub async fn version_delete(
|
||||
&redis,
|
||||
)
|
||||
.await?;
|
||||
remove_documents(&[version.inner.id.into()], &search_config).await?;
|
||||
|
||||
if result.is_some() {
|
||||
Ok(HttpResponse::NoContent().body(""))
|
||||
|
||||
Reference in New Issue
Block a user