Renames StoredDataUrls to Images

This commit is contained in:
Jonathan Bourdon
2024-08-06 01:04:15 -04:00
parent db740c161c
commit d370c2a151
12 changed files with 33 additions and 737 deletions

View File

@@ -27,7 +27,7 @@ public class ChangeBannerHandler(
{
var creator = await context
.Creators
.Include(c => c.StoredDataUrls)
.Include(c => c.Images)
.SingleOrDefaultAsync(
c => c.Id == request.CreatorId,
cancellationToken: ct);
@@ -46,7 +46,7 @@ public class ChangeBannerHandler(
request.File.ContentType,
ct);
creator.StoredDataUrls.BannerPictureUrl = blobUrl;
creator.Images.Banner = blobUrl;
await context.SaveChangesAsync(ct);

View File

@@ -27,7 +27,7 @@ public class ChangeLogoHandler(
{
var creator = await context
.Creators
.Include(c => c.StoredDataUrls)
.Include(c => c.Images)
.SingleOrDefaultAsync(
c => c.Id == request.CreatorId,
cancellationToken: ct);
@@ -46,7 +46,7 @@ public class ChangeLogoHandler(
request.File.ContentType,
ct);
creator.StoredDataUrls.ProfilePictureUrl = blobUrl;
creator.Images.Logo = blobUrl;
await context.SaveChangesAsync(ct);

View File

@@ -63,7 +63,7 @@ public class GetCreatorByAliasHandler(
About = creator.About,
Socials = creator.Socials,
ProfileColors = creator.ProfileColors,
StoredDataUrls = creator.StoredDataUrls,
Images = creator.Images,
SubscriberCount = subscriberCount,
};

View File

@@ -27,7 +27,7 @@ public class GetSubscriptionsHandler(
.Select(s => new SubscriptionModel(
s.CreatorId,
s.Creator!.Name,
s.Creator.StoredDataUrls.ProfilePictureUrl))
s.Creator.Images.Logo))
.ToListAsync(cancellationToken: ct);
await SendOkAsync(subscriptions, ct);

View File

@@ -11,6 +11,6 @@ public class CreatorModel
public About About { get; set; }
public Socials Socials { get; set; }
public ProfileColors ProfileColors { get; set; }
public StoredDataUrls StoredDataUrls { get; set; }
public Images Images { get; set; }
public int SubscriberCount { get; set; }
}

View File

@@ -38,7 +38,7 @@ public sealed class SubscribeToCreatorHandler(
.Select(c => new SubscriptionModel(
req.CreatorId,
c.Name,
c.StoredDataUrls.ProfilePictureUrl
c.Images.Logo
))
.FirstOrDefaultAsync(cancellationToken: ct);