controller(card): POST /card/protect

This commit is contained in:
gamer147
2026-05-28 01:56:47 -04:00
parent ecf819ca61
commit 1ee31c1689
3 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Requests.Card;
/// <summary>
/// POST /card/protect. Toggles the protected-card flag for a single card. The client (see
/// Wizard/CardProtectTask.cs) sends is_protected as a real boolean — the 0|1 int inconsistency
/// noted in the spec lives on the /load/index response side and is out of scope here.
/// </summary>
[MessagePackObject]
public class CardProtectRequest : BaseRequest
{
[JsonPropertyName("card_id")]
[Key("card_id")]
public long CardId { get; set; }
[JsonPropertyName("is_protected")]
[Key("is_protected")]
public bool IsProtected { get; set; }
}

View File

@@ -0,0 +1,12 @@
using MessagePack;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.Card;
/// <summary>
/// /card/protect response data — empty. The client just needs result_code=1 in the envelope's
/// data_headers; it mutates its own FavoriteCardList from its request-side knowledge.
/// </summary>
[MessagePackObject]
public class CardProtectResponse
{
}