Ejemplo n.º 1
0
        public async Task <IActionResult> GetAllTextTracks(int videoId)
        {
            try
            {
                var result = await _videoServices.GetAllTextTracks(videoId);

                return(Ok(result));
            }
            catch (NotFoundException ex)
            {
                return(NotFound(ex.Message));
            }
            catch (VideoUpdateException ex)
            {
                return(BadRequest(ex.Message));
            }
            catch (Exception ex)
            {
                _logger.LogCritical($"GetAllTextTracks() Error: {ex}");
                return(StatusCode(500, "Internal Server Error"));
            }
        }