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
@@ -0,0 +1,29 @@
using Microsoft.AspNetCore.Mvc;
using RecRoomArchive.Models.API.Platform;
using RecRoomArchive.Models.API.Players;
using RecRoomArchive.Services;
namespace RecRoomArchive.Controllers.API.PlatformLogin.V1
{
[Route("api/[controller]/v1")]
[ApiController]
public class PlatformLoginController(AccountService accountService) : ControllerBase
{
[HttpPost(template: "profiles")]
public async Task<ActionResult<List<BaseProfile>>> GetProfiles([FromForm(Name = "Platform")] PlatformType platform, [FromForm(Name = "PlatformId")] ulong platformId)
{
if (!accountService.AccountExists())
{
accountService.CreateAccount();
}
var profile = accountService.GetSelfAccount();
if (profile == null)
return BadRequest("Please relaunch RRAC and re-run setup");
List<BaseProfile> profiles = [profile];
return Ok(profiles);
}
}
}