Added reading list owner to the API for Mio's Mihon work.

This commit is contained in:
Joseph Milazzo 2025-06-04 20:42:33 -05:00
parent c32f648141
commit 9be3101b55
2 changed files with 7 additions and 1 deletions

View file

@ -49,6 +49,11 @@ public sealed record ReadingListDto : IHasCoverImage
/// </summary> /// </summary>
public required AgeRating AgeRating { get; set; } = AgeRating.Unknown; public required AgeRating AgeRating { get; set; } = AgeRating.Unknown;
/// <summary>
/// Username of the User that owns (in the case of a promoted list)
/// </summary>
public string OwnerUserName { get; set; }
public void ResetColorScape() public void ResetColorScape()
{ {
PrimaryColor = string.Empty; PrimaryColor = string.Empty;

View file

@ -287,7 +287,8 @@ public class AutoMapperProfiles : Profile
CreateMap<AppUserBookmark, BookmarkDto>(); CreateMap<AppUserBookmark, BookmarkDto>();
CreateMap<ReadingList, ReadingListDto>() CreateMap<ReadingList, ReadingListDto>()
.ForMember(dest => dest.ItemCount, opt => opt.MapFrom(src => src.Items.Count)); .ForMember(dest => dest.ItemCount, opt => opt.MapFrom(src => src.Items.Count))
.ForMember(dest => dest.OwnerUserName, opt => opt.MapFrom(src => src.AppUser.UserName));
CreateMap<ReadingListItem, ReadingListItemDto>(); CreateMap<ReadingListItem, ReadingListItemDto>();
CreateMap<ScrobbleError, ScrobbleErrorDto>(); CreateMap<ScrobbleError, ScrobbleErrorDto>();
CreateMap<ChapterDto, TachiyomiChapterDto>(); CreateMap<ChapterDto, TachiyomiChapterDto>();