feat(tutorial): add /tutorial/update — echo step + persist to viewer
POST /tutorial/update echoes tutorial_step back and saves it to Viewer.MissionData.TutorialState. is_skip=1 is handled server-side by honoring whatever tutorial_step value the client sends (client already sends 100 when skipping). Adds TutorialUpdateRequest DTO, TutorialUpdateResponse DTO, injects SVSimDbContext into TutorialController, and adds GetViewerTutorialStateAsync helper to SVSimTestFactory. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.Tutorial;
|
||||
|
||||
/// <summary>
|
||||
/// Server echoes the new step. Capture confirms exact value mirror — no validation,
|
||||
/// no munging. <c>tutorial_replay_step</c> is in the spec as optional but the live capture
|
||||
/// never includes it; omit unless we observe a need.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class TutorialUpdateResponse
|
||||
{
|
||||
[JsonPropertyName("tutorial_step")]
|
||||
[Key("tutorial_step")]
|
||||
public int TutorialStep { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user