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>> 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 profiles = [profile]; return Ok(profiles); } } }