예제 #1
0
        public async Task <IActionResult> DislikeSong([FromQuery] int songId)
        {
            int userId = ClaimHelper.FindNameIdentifier(HttpContext.User.Claims);

            var result = await _songService.DislikeSong(userId, songId);

            if (!result.Success)
            {
                return(BadRequest(result.Message));
            }

            var songDto = _mapper.Map <Song, SongDto>(result.Resource);

            return(Ok(songDto));
        }