2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-20 11:21:14 +00:00

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()?; let hash = repo.hash(&alias).await.retry()?;
repo.cleanup_alias(&alias).await.retry()?;
repo.remove_relation(alias.clone()).await.retry()?; repo.remove_relation(alias.clone()).await.retry()?;
repo.remove_alias_access(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()?; let hash = hash.ok_or(UploadError::MissingAlias).abort()?;