コード例 #1
0
        //[Authorize]
        //  [ServiceFilter(typeof(IsOrganisationActiveAttribute))]
        public async Task <IActionResult> GetAllNotificationLogs(int pageNumber, int pageSize, string sortColumnName, string sortOrderDirection)
        {
            try
            {
                var userNotifications = await _userPushedNotificationService.GetPushNotificationLogs(pageNumber, pageSize, sortColumnName, sortOrderDirection);

                if (userNotifications == null)
                {
                    return(Ok(new ApiResponse(Microsoft.AspNetCore.Http.StatusCodes.Status200OK, false, MessagesConstants.UserNotificationSettingsNotUpdated)));
                }
                return(Ok(new ApiResponse(Microsoft.AspNetCore.Http.StatusCodes.Status200OK, true, MessagesConstants.DataSuccessfullyReturned, userNotifications)));
            }
            catch (Exception ex)
            {
                HttpContext.RiseError(new Exception(string.Concat("API := (Notifications := NotificationLogsList)", ex.Message, " Stack Trace : ", ex.StackTrace, " Inner Exception : ", ex.InnerException)));
                return(Ok(new ApiResponse(Microsoft.AspNetCore.Http.StatusCodes.Status200OK, false, MessagesConstants.DataNotSuccessfullyReturned)));
            }
        }