mirror of
https://git.recroomarchive.org/RecRoomArchive/RRAC.git
synced 2026-09-08 14:41:25 -07:00
More changes...
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user