Clear owner's project cache after deleting organization (#3794)
* Clear owner's project cache after deleting organization Fixes an issue where people would think their projects were deleted along with their organization, when this isn't actually the case. * address PR review * Update apps/labrinth/src/routes/v3/organizations.rs Signed-off-by: Emma Alexia <wafflecoffee7@gmail.com> * Fix lint * actually fix lint --------- Signed-off-by: Emma Alexia <wafflecoffee7@gmail.com>
This commit is contained in:
parent
22fc0c994d
commit
6f03fae233
@ -667,8 +667,13 @@ pub async fn organization_delete(
|
||||
)
|
||||
.await?;
|
||||
|
||||
for team_id in organization_project_teams {
|
||||
database::models::DBTeamMember::clear_cache(team_id, &redis).await?;
|
||||
for team_id in &organization_project_teams {
|
||||
database::models::DBTeamMember::clear_cache(*team_id, &redis).await?;
|
||||
}
|
||||
|
||||
if !organization_project_teams.is_empty() {
|
||||
database::models::DBUser::clear_project_cache(&[owner_id], &redis)
|
||||
.await?;
|
||||
}
|
||||
|
||||
if result.is_some() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user