Finish total result and options page, add unlock all music function

This commit is contained in:
asesidaa
2023-02-22 02:55:32 +08:00
parent 4d0e351abd
commit e5eee66ff2
22 changed files with 644 additions and 70 deletions
@@ -16,7 +16,7 @@ public class ProfilesController : BaseController<ProfilesController>
return result;
}
[HttpGet("{cardId:long}")]
[HttpGet("TotalResult/{cardId:long}")]
public async Task<ServiceResult<TotalResultData>> GetCardTotalResultById(long cardId)
{
var result = await Mediator.Send(new GetTotalResultQuery(cardId));
@@ -24,9 +24,9 @@ public class ProfilesController : BaseController<ProfilesController>
}
[HttpPost("Favorite")]
public async Task<ServiceResult<bool>> SetFavoriteMusic(MusicDetailDto detail)
public async Task<ServiceResult<bool>> SetFavoriteMusic(MusicFavoriteDto favorite)
{
var result = await Mediator.Send(new SetFavoriteMusicCommand(detail));
var result = await Mediator.Send(new SetFavoriteMusicCommand(favorite));
return result;
}
@@ -36,4 +36,12 @@ public class ProfilesController : BaseController<ProfilesController>
var result = await Mediator.Send(new SetPlayerNameCommand(card));
return result;
}
[HttpPost("UnlockAllMusic/{cardId:long}")]
public async Task<ServiceResult<bool>> UnlockAllMusic(long cardId)
{
var result = await Mediator.Send(new UnlockAllMusicCommand(cardId));
return result;
}
}