diff options
author | Levi Bard <taktaktaktaktaktaktaktaktaktak@gmail.com> | 2021-01-10 12:47:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-10 12:47:21 +0100 |
commit | 11d603101a7b3389c679b8c155a3cb06203ca31a (patch) | |
tree | b54db656ef55f1ea3dc82750030d504ecdb4b3fd /app/controllers/api | |
parent | 087ed84367537ac168ed3e00bb7eb4bd582dc3d0 (diff) |
Fix muting users with duration via the REST api (#15516)
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/v1/accounts_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index 3e66ff212..953874e1a 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -42,7 +42,7 @@ class Api::V1::AccountsController < Api::BaseController end def mute - MuteService.new.call(current_user.account, @account, notifications: truthy_param?(:notifications), duration: (params[:duration] || 0)) + MuteService.new.call(current_user.account, @account, notifications: truthy_param?(:notifications), duration: (params[:duration]&.to_i || 0)) render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships end |