Remove proxies row before deleting alias

This fixes the issue of invalidating the proxies alias foreign key
This commit is contained in:
asonix 2024-06-03 16:29:13 -05:00
parent 1c4e343d9d
commit 8cf8b2bc05

View file

@ -153,9 +153,9 @@ pub(crate) async fn alias(repo: &ArcRepo, alias: Alias, token: DeleteToken) -> J
let hash = repo.hash(&alias).await.retry()?;
repo.cleanup_alias(&alias).await.retry()?;
repo.remove_relation(alias.clone()).await.retry()?;
repo.remove_alias_access(alias.clone()).await.retry()?;
repo.cleanup_alias(&alias).await.retry()?;
let hash = hash.ok_or(UploadError::MissingAlias).abort()?;