Add storedDataUrls to GetCurrentUser
This commit is contained in:
@@ -19,5 +19,6 @@ public class UserModel
|
|||||||
public string Description { get; init; } = string.Empty;
|
public string Description { get; init; } = string.Empty;
|
||||||
public SocialNetworksModel SocialNetworks { get; init; } = new();
|
public SocialNetworksModel SocialNetworks { get; init; } = new();
|
||||||
public ProfileColorsModel ProfileColors { get; init; } = new();
|
public ProfileColorsModel ProfileColors { get; init; } = new();
|
||||||
|
public StoredDataUrlsModel StoredDataUrls { get; init; } = new();
|
||||||
public string ProfilePictureUrl { get; set; } = string.Empty;
|
public string ProfilePictureUrl { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|||||||
8
src/Application/Users/Models/StoredDataUrlsModel.cs
Normal file
8
src/Application/Users/Models/StoredDataUrlsModel.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
namespace Hutopy.Application.Users.Models;
|
||||||
|
|
||||||
|
public class StoredDataUrlsModel
|
||||||
|
{
|
||||||
|
public string BannerPictureUrl { get; set; } = string.Empty;
|
||||||
|
public string ProfilePictureUrl { get; set; } = string.Empty;
|
||||||
|
public string WebsiteIconUrl { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
@@ -41,6 +41,8 @@ public class GetCurrentUserQueryHandler(
|
|||||||
About = identityUser.About ?? "",
|
About = identityUser.About ?? "",
|
||||||
Description = identityUser.Description ?? "",
|
Description = identityUser.Description ?? "",
|
||||||
SocialNetworks = identityUser.SocialNetworks,
|
SocialNetworks = identityUser.SocialNetworks,
|
||||||
|
ProfileColors = identityUser.ProfileColors,
|
||||||
|
StoredDataUrls = identityUser.StoredDataUrls,
|
||||||
UserTransactions = transactions,
|
UserTransactions = transactions,
|
||||||
TotalBalance = transactions.Sum(x => x.Amount),
|
TotalBalance = transactions.Sum(x => x.Amount),
|
||||||
UserRoles = roles,
|
UserRoles = roles,
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ public class UserDto
|
|||||||
public string About { get; init; } = string.Empty;
|
public string About { get; init; } = string.Empty;
|
||||||
public string Description { get; init; } = string.Empty;
|
public string Description { get; init; } = string.Empty;
|
||||||
public SocialNetworksModel SocialNetworks { get; init; } = new();
|
public SocialNetworksModel SocialNetworks { get; init; } = new();
|
||||||
|
public ProfileColorsModel ProfileColors { get; init; } = new();
|
||||||
|
public StoredDataUrlsModel StoredDataUrls { get; init; } = new();
|
||||||
public List<UserTransactionDto> UserTransactions { get; init; } = [];
|
public List<UserTransactionDto> UserTransactions { get; init; } = [];
|
||||||
public IList<string> UserRoles { get; init; } = [];
|
public IList<string> UserRoles { get; init; } = [];
|
||||||
public required decimal TotalBalance { get; init; }
|
public required decimal TotalBalance { get; init; }
|
||||||
|
|||||||
@@ -171,6 +171,12 @@ public class IdentityService(
|
|||||||
BannerBottom = response.ProfileColors.BannerBottom,
|
BannerBottom = response.ProfileColors.BannerBottom,
|
||||||
Accent = response.ProfileColors.Accent,
|
Accent = response.ProfileColors.Accent,
|
||||||
Menu = response.ProfileColors.Menu
|
Menu = response.ProfileColors.Menu
|
||||||
|
},
|
||||||
|
StoredDataUrls = new StoredDataUrlsModel
|
||||||
|
{
|
||||||
|
ProfilePictureUrl = response.StoredDataUrls.ProfilePictureUrl,
|
||||||
|
BannerPictureUrl = response.StoredDataUrls.BannerPictureUrl,
|
||||||
|
WebsiteIconUrl = response.StoredDataUrls.WebsiteIconUrl,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -215,6 +221,12 @@ public class IdentityService(
|
|||||||
BannerBottom = response.ProfileColors.BannerBottom,
|
BannerBottom = response.ProfileColors.BannerBottom,
|
||||||
Accent = response.ProfileColors.Accent,
|
Accent = response.ProfileColors.Accent,
|
||||||
Menu = response.ProfileColors.Menu
|
Menu = response.ProfileColors.Menu
|
||||||
|
},
|
||||||
|
StoredDataUrls = new StoredDataUrlsModel
|
||||||
|
{
|
||||||
|
ProfilePictureUrl = response.StoredDataUrls.ProfilePictureUrl,
|
||||||
|
BannerPictureUrl = response.StoredDataUrls.BannerPictureUrl,
|
||||||
|
WebsiteIconUrl = response.StoredDataUrls.WebsiteIconUrl,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user