More changes...

This commit is contained in:
splootybean
2026-02-27 19:30:49 -08:00
parent 20fdf60665
commit b64e257b9a
36 changed files with 553 additions and 63 deletions
@@ -69,7 +69,13 @@ namespace RecRoomArchive.Controllers.API.Players
[HttpPut(template: "{profileId:long}")]
public async Task<ActionResult<AugustProfile>> UpdateProfile([Required] ulong profileId, [FromBody] AugustProfile model)
{
return (AugustProfile)accountService.GetSelfAccount()!;
var baseProfile = accountService.GetSelfAccount();
if (baseProfile == null)
return NotFound();
var profile = new AugustProfile(baseProfile);
return profile;
}
}
}
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using RecRoomArchive.Models.API.Config;
using RecRoomArchive.Models.API.Platform;
using RecRoomArchive.Models.API.Players;
using RecRoomArchive.Services;
@@ -1,4 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using RecRoomArchive.Controllers.API.Notification;
using RecRoomArchive.Models.API.Notification;
using RecRoomArchive.Models.API.Players;
using RecRoomArchive.Models.Common;
using RecRoomArchive.Services;
@@ -31,6 +33,8 @@ namespace RecRoomArchive.Controllers.API.Players.V2
fileService.SetData("profile.json", JsonSerializer.Serialize(profile));
await NotificationController.Notify(profile.Id, PushNotificationId.SubscriptionUpdateProfile, profile);
return Ok(OkResponse.Ok());
}
}