Add batch character assignment for chapter outline beats
Lets a writer select several beats and add one character to all of them at once, without disturbing each beat's existing characters. Surfaced through the REST API, the embedded agent, and the MCP server per the project's rule that all three share the same service methods.
This commit is contained in:
@@ -34,6 +34,11 @@ public static class BeatEndpoints
|
||||
(await service.ReorderAsync(chapterId, request, ct))?.Select(b => b.ToResponse()).ToList().ToApiResult())
|
||||
.WithSummary("Renumber a chapter's beats to match the order given.");
|
||||
|
||||
chapterScoped.MapPost("/assign-character", async (
|
||||
Guid chapterId, AssignCharacterToBeatsRequest request, BeatService service, CancellationToken ct) =>
|
||||
(await service.AssignCharacterAsync(chapterId, request, ct))?.Select(b => b.ToResponse()).ToList().ToApiResult())
|
||||
.WithSummary("Add a character to several beats at once, leaving each beat's existing characters alone.");
|
||||
|
||||
app.MapGet("/api/characters/{characterId:guid}/beats", async (
|
||||
Guid characterId, BeatService service, CancellationToken ct) =>
|
||||
(await service.ListForCharacterAsync(characterId, ct))?.Select(b => b.ToCharacterBeatResponse()).ToList().ToApiResult())
|
||||
|
||||
Reference in New Issue
Block a user