Ejemplo n.º 1
0
        public IHttpActionResult DeleteTvGenre(string id, string genre)
        {
            if (string.IsNullOrWhiteSpace(genre))
            {
                return(BadRequest(Resources.EmptyGenre));
            }

            try
            {
                _genreManager.DeleteTvGenre(User.GetUserId(), genre);
            }
            catch (ValidationException exception)
            {
                return(BadRequest(exception.Message));
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }