Skip to content

Commit

Permalink
hm
Browse files Browse the repository at this point in the history
  • Loading branch information
Ember-ruby committed Jun 29, 2024
1 parent b5df5a7 commit a1cd136
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/controllers/api/v1/timelines/public_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ def show
private

def require_auth?
!Setting.timeline_preview
if truthy_param?(:local)
!Setting.timeline_preview_local
elsif truthy_param?(:remote)
!Setting.timeline_preview_remote
if !Setting.timeline_preview

Check failure on line 17 in app/controllers/api/v1/timelines/public_controller.rb

View workflow job for this annotation

GitHub Actions / lint

[Correctable] Style/NegatedIfElseCondition: Invert the negated condition and swap the if-else branches.
if truthy_param?(:local)
!Setting.timeline_preview_local
elsif truthy_param?(:remote)
!Setting.timeline_preview_remote
end
else
!Setting.timeline_preview
end
end

Expand Down

0 comments on commit a1cd136

Please sign in to comment.