fix(audit léger): stats carrière, présence amis, AddGenericId
Build & Deploy / build (push) Successful in 43s
Build & Deploy / build (push) Successful in 43s
- GetPlayerStatisticsRequestsClient: renvoyait vide -> renvoie les stats demandées
(0 pour l'instant, raid client-hosted non traçable) pour que l'écran carrière s'affiche.
- UpdatePlayerPresenceState: persiste {inMatch,lastSeenUtc}; GetFriendList lit la présence
et calcule onlineState (online si vu <3min, 2=en raid) au lieu de 0 en dur.
- AddGenericId: persiste l'id de service lié (était un no-op).
(Free-loadout non touché: S3 only, pas de free-loadout en S2.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -140,8 +140,18 @@ public class ClientController : Controller
|
||||
[HttpPost("AddGenericID")]
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
|
||||
public IActionResult AddGenericId(FAddGenericIDRequest request)
|
||||
public async Task<IActionResult> AddGenericId(FAddGenericIDRequest request)
|
||||
{
|
||||
// Persist the linked generic service id instead of dropping it (was a no-op stub).
|
||||
var userId = User.FindAuthUserId();
|
||||
if (request.GenericId != null && !string.IsNullOrEmpty(request.GenericId.ServiceName))
|
||||
{
|
||||
await _userDataService.UpdateAsync(userId, userId, new Dictionary<string, string>
|
||||
{
|
||||
["GenericId_" + request.GenericId.ServiceName] = request.GenericId.UserId ?? ""
|
||||
});
|
||||
}
|
||||
|
||||
return Ok(new ClientResponse<object>
|
||||
{
|
||||
Code = 200,
|
||||
|
||||
Reference in New Issue
Block a user