Files
SVSimServer/SVSim.EmulatedEntrypoint/Models/Dtos/Requests/Tutorial/TutorialUpdateRequest.cs
gamer147 bc9ffe1d31 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>
2026-05-28 11:47:09 -04:00

24 lines
780 B
C#

using System.Text.Json.Serialization;
using MessagePack;
using SVSim.EmulatedEntrypoint.Models.Dtos.Requests;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Requests.Tutorial;
/// <summary>
/// <c>POST /tutorial/update</c> — client reports the step it is moving TO.
/// Client task: <c>Wizard/TutorialUpdateTask.cs</c>.
/// </summary>
[MessagePackObject]
public class TutorialUpdateRequest : BaseRequest
{
/// <summary>The tutorial step the client is moving TO (0, 1, 11, 21, 31, 41, 100).</summary>
[JsonPropertyName("tutorial_step")]
[Key("tutorial_step")]
public int TutorialStep { get; set; }
/// <summary>0 = normal, 1 = user chose Skip Tutorial.</summary>
[JsonPropertyName("is_skip")]
[Key("is_skip")]
public int IsSkip { get; set; }
}