using Application.Api; using Application.Common.Models; using Application.Dto.Api; using Microsoft.AspNetCore.Mvc; namespace MainServer.Controllers.API; [ApiController] [Route("api/[controller]")] public class ProfilesController : BaseController { [HttpGet] public async Task>>> GetAllCards() { var result = await Mediator.Send(new GetCardsQuery()); return result; } [HttpGet("{cardId:long}")] public async Task>> GetCardTotalResultById(long cardId) { var result = await Mediator.Send(new GetTotalResultQuery(cardId)); return result; } [HttpPost("Favorite")] public async Task>> SetFavoriteMusic(MusicDetailDto detail) { var result = await Mediator.Send(new SetFavoriteMusicCommand(detail)); return result; } [HttpPost("PlayerName")] public async Task>> SetPlayerName(ClientCardDto card) { var result = await Mediator.Send(new SetPlayerNameCommand(card)); return result; } }