feat(backend): avatar migration stuff

This commit is contained in:
sam 2025-04-17 16:05:26 +02:00
parent bcdb2f9540
commit 77e74dd331
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
15 changed files with 2094 additions and 0 deletions

View file

@ -67,6 +67,7 @@ public class MemberAvatarUpdateJob(
await objectStorageService.PutObjectAsync(Path(id, hash), image, "image/webp");
member.Avatar = hash;
member.AvatarMigrated = true;
await db.SaveChangesAsync();
if (prevHash != null && prevHash != hash)

View file

@ -68,6 +68,7 @@ public class UserAvatarUpdateJob(
await objectStorageService.PutObjectAsync(Path(id, hash), image, "image/webp");
user.Avatar = hash;
user.AvatarMigrated = true;
await db.SaveChangesAsync();
if (prevHash != null && prevHash != hash)