refactor: normalize Author entity, eliminate magic strings, and improve exception handling per PR review

This commit is contained in:
2026-05-10 17:07:09 +02:00
parent fc68ee41ab
commit 10dc511f2a
12 changed files with 86 additions and 25 deletions
+5 -1
View File
@@ -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"