using Microsoft.AspNetCore.Mvc;
using RecRoomArchive.Models.API.Platform;
using RecRoomArchive.Models.API.Players;
using RecRoomArchive.Services;
using System.ComponentModel.DataAnnotations;
namespace RecRoomArchive.Controllers.API.Players.V1
{
///
/// Used to get accounts / profiles in 2016-2020 although gets phased out as time goes on...
///
[Route(template: "api/[controller]/v1")]
[ApiController]
public class PlayersController(AccountService accountService) : ControllerBase
{
///
/// Returns the profile of this ID (If it exists)
///
/// The ID of the player we are trying to get the profile of
/// The profile of the player, if it exists
[HttpGet(template: "{id:long}")]
public async Task> GetProfile([Required] ulong id)
{
return accountService.GetSelfAccount()!;
}
[HttpPost(template: "listByPlatformId")]
public async Task>> GetFromServer([FromForm] PlatformType platform, [FromForm] List platformIds)
{
return Ok(new List