refactor: normalize Author entity, eliminate magic strings, and improve exception handling per PR review
This commit is contained in:
@@ -458,7 +458,11 @@ app.MapGet("/identity/profile", async (ClaimsPrincipal user, UserManager<NexusUs
|
||||
{
|
||||
Id = e.Id,
|
||||
Title = e.Title,
|
||||
Author = e.Author,
|
||||
Author = new AuthorDto
|
||||
{
|
||||
Id = e.Author.Id,
|
||||
Name = e.Author.Name
|
||||
},
|
||||
CoverUrl = e.CoverUrl,
|
||||
Progress = 65,
|
||||
LastChapter = "Chapter 4: Renaissance in Italy"
|
||||
|
||||
@@ -68,7 +68,11 @@ public class ServerIdentityService : IIdentityService
|
||||
{
|
||||
Id = e.Id,
|
||||
Title = e.Title,
|
||||
Author = e.Author,
|
||||
Author = new AuthorDto
|
||||
{
|
||||
Id = e.Author.Id,
|
||||
Name = e.Author.Name
|
||||
},
|
||||
CoverUrl = e.CoverUrl,
|
||||
Progress = 65, // Hardcoded for now as per design requirements, will link to real segments later
|
||||
LastChapter = "Chapter 4: Renaissance in Italy"
|
||||
|
||||
Reference in New Issue
Block a user