mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 23:20:44 +01:00
Fix Lint/RedundantSafeNavigation
cop (#28172)
This commit is contained in:
parent
a98fccf84e
commit
d83d01eb1e
2 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ class Api::V1::AccountsController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def mute
|
def mute
|
||||||
MuteService.new.call(current_user.account, @account, notifications: truthy_param?(:notifications), duration: (params[:duration]&.to_i || 0))
|
MuteService.new.call(current_user.account, @account, notifications: truthy_param?(:notifications), duration: params[:duration].to_i)
|
||||||
render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships
|
render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Trends::History
|
||||||
end
|
end
|
||||||
|
|
||||||
def uses
|
def uses
|
||||||
with_redis { |redis| redis.get(key_for(:uses))&.to_i || 0 }
|
with_redis { |redis| redis.get(key_for(:uses)).to_i }
|
||||||
end
|
end
|
||||||
|
|
||||||
def add(account_id)
|
def add(account_id)
|
||||||
|
|
Loading…
Reference in a new issue