| 
				
			 | 
			
			
				@@ -10,7 +10,7 @@ class Api::ActivitiesController < ApiController 
			 | 
		
	
		
			
			| 
				10
			 | 
			
				10
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				11
			 | 
			
				11
			 | 
			
			
				   # Group API-key-based authentication/authorization 
			 | 
		
	
		
			
			| 
				12
			 | 
			
				12
			 | 
			
			
				   before_action :api_auth_group_token,    if: 'request.authorization' 
			 | 
		
	
		
			
			| 
				13
			 | 
			
				
			 | 
			
			
				-  before_action :set_activity_from_group, if: 'request.authorization' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				13
			 | 
			
			
				+  before_action :set_activity_with_group, if: 'request.authorization' 
			 | 
		
	
		
			
			| 
				14
			 | 
			
				14
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				15
			 | 
			
				15
			 | 
			
			
				   # GET /api/activities 
			 | 
		
	
		
			
			| 
				16
			 | 
			
				16
			 | 
			
			
				   def index 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -92,7 +92,7 @@ class Api::ActivitiesController < ApiController 
			 | 
		
	
		
			
			| 
				92
			 | 
			
				92
			 | 
			
			
				   end 
			 | 
		
	
		
			
			| 
				93
			 | 
			
				93
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				94
			 | 
			
				94
			 | 
			
			
				   # Set activity from the :id-parameter, and assert that it belongs to the set @group. 
			 | 
		
	
		
			
			| 
				95
			 | 
			
				
			 | 
			
			
				-  def set_activity_from_group 
			 | 
		
	
		
			
			| 
				
			 | 
			
				95
			 | 
			
			
				+  def set_activity_with_group 
			 | 
		
	
		
			
			| 
				96
			 | 
			
				96
			 | 
			
			
				     @activity = Activity.find_by id: params[:id] 
			 | 
		
	
		
			
			| 
				97
			 | 
			
				97
			 | 
			
			
				     unless @activity 
			 | 
		
	
		
			
			| 
				98
			 | 
			
				98
			 | 
			
			
				       head :not_found 
			 |