feat(profile): ProfileController + DTOs + integration tests
Add /profile/index endpoint that returns user_rank_match_total_win (stubbed 0) and user_class_list built from viewer Classes + owned LeaderSkins. Six NUnit integration tests cover zero wins, all classes present, level/exp/default skin, leader_skin_id_list population, is_random_leader_skin round-trip, and 401 on unauthenticated access. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Profile;
|
||||
|
||||
/// <summary>
|
||||
/// Empty request body. The endpoint takes no parameters (client task uses BaseParam directly);
|
||||
/// this DTO exists so model binding resolves the envelope correctly.
|
||||
/// </summary>
|
||||
[MessagePackObject(true)]
|
||||
public sealed class ProfileIndexRequest
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Profile;
|
||||
|
||||
[MessagePackObject]
|
||||
public sealed class ProfileIndexResponse
|
||||
{
|
||||
[JsonPropertyName("user_rank_match_total_win")]
|
||||
[Key("user_rank_match_total_win")]
|
||||
public int UserRankMatchTotalWin { get; set; }
|
||||
|
||||
[JsonPropertyName("user_class_list")]
|
||||
[Key("user_class_list")]
|
||||
public List<UserClass> UserClassList { get; set; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user