예제 #1
0
        public IActionResult GetDashboardReportPosition(string dashboardGUID, string reportGUID)
        {
            try
            {
                if (string.IsNullOrEmpty(dashboardGUID) || string.IsNullOrEmpty(reportGUID))
                {
                    throw new BasicException("Empty GUID");
                }

                string position = _manager.GetPosition(dashboardGUID, reportGUID);

                return(Ok(position));
            }
            catch (BasicException ex)
            {
                _logger.LogError(ex.Message);
                return(BadRequest(ex.Message));
            }
            catch (NotFoundException ex)
            {
                _logger.LogError(ex.Message);
                return(NotFound(ex.Message));
            }
            catch (PermissionException ex)
            {
                _logger.LogError(ex.Message);
                return(Unauthorized());
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message);
                return(BadRequest());
            }
        }