Add duration parameter to muting. (#13831)
* Adding duration to muting. * Remove useless checks
This commit is contained in:
@ -42,7 +42,7 @@ class Api::V1::AccountsController < Api::BaseController
|
||||
end
|
||||
|
||||
def mute
|
||||
MuteService.new.call(current_user.account, @account, notifications: truthy_param?(:notifications))
|
||||
MuteService.new.call(current_user.account, @account, notifications: truthy_param?(:notifications), duration: (params[:duration] || 0))
|
||||
render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships
|
||||
end
|
||||
|
||||
|
@ -7,7 +7,7 @@ class Api::V1::MutesController < Api::BaseController
|
||||
|
||||
def index
|
||||
@accounts = load_accounts
|
||||
render json: @accounts, each_serializer: REST::AccountSerializer
|
||||
render json: @accounts, each_serializer: REST::MutedAccountSerializer
|
||||
end
|
||||
|
||||
private
|
||||
|
Reference in New Issue
Block a user