public IActionResult GetFromId(int genreId) { var genre = _repository.GetFromId(genreId); GenreResponse response = GenreResponse.MapFromObject(genre); return(Ok(response)); }
public IActionResult GetImplementedByUser() { var userId = TokenManager.ExtractUserId(User.Claims); var genres = _repository.GetByUser(userId); List <GenreResponse> response = new List <GenreResponse>(); foreach (var genre in genres) { response.Add(GenreResponse.MapFromObject(genre)); } return(Ok(response)); }