🐛 Fix missing file permission creation
This commit is contained in:
@@ -122,12 +122,16 @@ public class AccountCurrentController(
|
||||
{
|
||||
var file = await files.GetFileAsync(new GetFileRequest { Id = request.PictureId });
|
||||
profile.Picture = SnCloudFileReferenceObject.FromProtoValue(file);
|
||||
|
||||
await files.SetFilePublicAsync(new SetFilePublicRequest { FileId = request.PictureId });
|
||||
}
|
||||
|
||||
if (request.BackgroundId is not null)
|
||||
{
|
||||
var file = await files.GetFileAsync(new GetFileRequest { Id = request.BackgroundId });
|
||||
profile.Background = SnCloudFileReferenceObject.FromProtoValue(file);
|
||||
|
||||
await files.SetFilePublicAsync(new SetFilePublicRequest { FileId = request.BackgroundId });
|
||||
}
|
||||
|
||||
db.Update(profile);
|
||||
|
||||
Reference in New Issue
Block a user