forked from jmug/stoatchat
Delete old avatar; fix database migration.
This commit is contained in:
@@ -67,6 +67,10 @@ pub async fn req(user: User, mut data: Json<Data>, _ignore_id: String) -> Result
|
||||
.publish(user.id.clone())
|
||||
.await
|
||||
.ok();
|
||||
|
||||
if let Some(old_avatar) = user.avatar {
|
||||
old_avatar.delete().await?;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user