mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-22 23:09:20 +00:00
Fix code style issues
This commit is contained in:
@@ -44,19 +44,15 @@ class Api::V1::MutesController < Api::BaseController
|
||||
end
|
||||
|
||||
def next_path
|
||||
if records_continue?
|
||||
url_for pagination_params(max_id: pagination_max_id)
|
||||
end
|
||||
url_for pagination_params(max_id: pagination_max_id) if records_continue?
|
||||
end
|
||||
|
||||
def prev_path
|
||||
unless@data.empty?
|
||||
url_for pagination_params(since_id: pagination_since_id)
|
||||
end
|
||||
url_for pagination_params(since_id: pagination_since_id) unless @data.empty?
|
||||
end
|
||||
|
||||
def pagination_max_id
|
||||
if params[:action] == "details"
|
||||
if params[:action] == 'details'
|
||||
@mutes.last.id
|
||||
else
|
||||
@accounts.last.muted_by_ids.last
|
||||
@@ -64,7 +60,7 @@ class Api::V1::MutesController < Api::BaseController
|
||||
end
|
||||
|
||||
def pagination_since_id
|
||||
if params[:action] == "details"
|
||||
if params[:action] == 'details'
|
||||
@mutes.first.id
|
||||
else
|
||||
@accounts.first.muted_by_ids.first
|
||||
|
||||
@@ -19,7 +19,7 @@ module AccountInteractions
|
||||
def muting_map(target_account_ids, account_id)
|
||||
Mute.where(target_account_id: target_account_ids, account_id: account_id).each_with_object({}) do |mute, mapping|
|
||||
mapping[mute.target_account_id] = {
|
||||
notifications: mute.hide_notifications?
|
||||
notifications: mute.hide_notifications?,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,3 +13,4 @@ class REST::MuteSerializer < ActiveModel::Serializer
|
||||
REST::AccountSerializer.new(object.target_account)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user