|
@ -13,8 +13,8 @@ class Api::V1::MutesController < Api::BaseController |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
def details |
|
|
def details |
|
|
@data = @mutes = paginated_mutes |
|
|
|
|
|
render json: @mutes |
|
|
|
|
|
|
|
|
@data = @mutes = load_mutes |
|
|
|
|
|
render json: @mutes, each_serializer: REST::MuteSerializer |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
private |
|
|
private |
|
@ -27,6 +27,10 @@ class Api::V1::MutesController < Api::BaseController |
|
|
Account.includes(:muted_by).references(:muted_by) |
|
|
Account.includes(:muted_by).references(:muted_by) |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def load_mutes |
|
|
|
|
|
paginated_mutes.includes(:account, :target_account).to_a |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
def paginated_mutes |
|
|
def paginated_mutes |
|
|
Mute.where(account: current_account).paginate_by_max_id( |
|
|
Mute.where(account: current_account).paginate_by_max_id( |
|
|
limit_param(DEFAULT_ACCOUNTS_LIMIT), |
|
|
limit_param(DEFAULT_ACCOUNTS_LIMIT), |
|
|