Fix cache issues with creator's logo and banner
This commit is contained in:
@@ -8,6 +8,10 @@ public record ChangeLogoRequest(
|
||||
Guid CreatorId,
|
||||
IFormFile File);
|
||||
|
||||
[PublicAPI]
|
||||
public record ChangeLogoResponse(
|
||||
string BlobUrl);
|
||||
|
||||
[PublicAPI]
|
||||
public sealed class ChangeLogoRequestValidator : Validator<ChangeLogoRequest>
|
||||
{
|
||||
@@ -61,10 +65,12 @@ public class ChangeLogoHandler(
|
||||
request.File.ContentType,
|
||||
ct);
|
||||
|
||||
creator.Images.Logo = blobUrl;
|
||||
creator.Images.Logo = $"{blobUrl}?t={DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}";
|
||||
|
||||
await context.SaveChangesAsync(ct);
|
||||
|
||||
await SendOkAsync(blobUrl, ct);
|
||||
await SendOkAsync(
|
||||
new ChangeLogoResponse(blobUrl),
|
||||
ct);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user