示例#1
0
        public async Task <IActionResult> FavoriteTrackAsync(string trackId)
        {
            try
            {
                PartyGoer user = await _partyGoerService.GetCurrentPartyGoerAsync();

                await _partyGoerService.FavoriteTrackAsync(user, trackId);

                return(Ok());
            }
            catch (Exception ex)
            {
                await _logService.LogExceptionAsync(ex, $"Error occurred while user was trying to favorite song {trackId}");

                return(StatusCode(500));
            }
        }