Add notification policies and notification requests in web UI (#29433)
This commit is contained in:
		
					parent
					
						
							
								19efa1b9f1
							
						
					
				
			
			
				commit
				
					
						c10bbf5fe3
					
				
			
		
					 35 changed files with 1278 additions and 252 deletions
				
			
		|  | @ -18,6 +18,10 @@ class Api::V1::Notifications::RequestsController < Api::BaseController | |||
|     render json: @requests, each_serializer: REST::NotificationRequestSerializer, relationships: @relationships | ||||
|   end | ||||
| 
 | ||||
|   def show | ||||
|     render json: @request, serializer: REST::NotificationRequestSerializer | ||||
|   end | ||||
| 
 | ||||
|   def accept | ||||
|     AcceptNotificationRequestService.new.call(@request) | ||||
|     render_empty | ||||
|  | @ -31,7 +35,7 @@ class Api::V1::Notifications::RequestsController < Api::BaseController | |||
|   private | ||||
| 
 | ||||
|   def load_requests | ||||
|     requests = NotificationRequest.where(account: current_account).where(dismissed: truthy_param?(:dismissed)).includes(:last_status, from_account: [:account_stat, :user]).to_a_paginated_by_id( | ||||
|     requests = NotificationRequest.where(account: current_account).where(dismissed: truthy_param?(:dismissed) || false).includes(:last_status, from_account: [:account_stat, :user]).to_a_paginated_by_id( | ||||
|       limit_param(DEFAULT_ACCOUNTS_LIMIT), | ||||
|       params_slice(:max_id, :since_id, :min_id) | ||||
|     ) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue