Fix /api/v1/accounts/update_credentials tests (#1357)
This commit is contained in:
		
					parent
					
						
							
								43f955e31f
							
						
					
				
			
			
				commit
				
					
						15d442cf9d
					
				
			
		
					 3 changed files with 35 additions and 29 deletions
				
			
		|  | @ -17,10 +17,8 @@ class Api::V1::AccountsController < ApiController | |||
|   end | ||||
| 
 | ||||
|   def update_credentials | ||||
|     @account = current_user.account | ||||
| 
 | ||||
|     @account.update_attributes!(account_params) | ||||
| 
 | ||||
|     current_account.update!(account_params) | ||||
|     @account = current_account | ||||
|     render action: :show | ||||
|   end | ||||
| 
 | ||||
|  | @ -146,6 +144,6 @@ class Api::V1::AccountsController < ApiController | |||
|   end | ||||
| 
 | ||||
|   def account_params | ||||
|     @account_params ||= params.permit(:display_name, :note, :avatar, :header) | ||||
|     params.permit(:display_name, :note, :avatar, :header) | ||||
|   end | ||||
| end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue