Exemplo n.º 1
0
        public async Task <IActionResult> GetVimeoVideoStutas(int videoId)
        {
            try
            {
                var results = await _videoServices.GetVimeoVideoStutasByIdAsync(videoId);

                return(Ok(results));
            }
            catch (CourseValidateException ex)
            {
                return(BadRequest(ex.Message));
            }
            catch (NotFoundException ex)
            {
                return(NotFound(ex.Message));
            }
            catch (BadRequestException ex)
            {
                return(BadRequest(ex.Message));
            }
            catch (ForbiddenException)
            {
                return(Forbid());
            }
            catch (Exception ex)
            {
                _logger.LogCritical($"GetVimeoVideoStutas() Error: {ex}");
                return(StatusCode(500, "Internal Server Error"));
            }
        }