From f9d7b8a94f4a89d76081a6265103f6d7439be250 Mon Sep 17 00:00:00 2001 From: Surinna Curtis Date: Wed, 13 Sep 2017 18:32:10 -0500 Subject: Refactor handling of default params for muting to make code cleaner --- app/controllers/api/v1/accounts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index de2cb0d97..3e9ac1025 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -33,7 +33,7 @@ class Api::V1::AccountsController < Api::BaseController end def mute - MuteService.new.call(current_user.account, @account, **params.permit(:notifications).to_hash.symbolize_keys) + MuteService.new.call(current_user.account, @account, notifications: params(:notifications)) render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships end -- cgit