Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix false FALoginCookieError
The `ensure_login!` method was always returning the `FALoginCookieError` due to the `@user_cookie` returning true, so I just made it false so it won't return the error.
  • Loading branch information
mruac authored Nov 5, 2022
commit e03b89e5dbfc47574ec790da3d98d42395099041
2 changes: 1 addition & 1 deletion lib/faexport.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def set_content_type(type)
end

def ensure_login!
return if @user_cookie
return if !@user_cookie

Check notice

Code scanning / Rubocop

Favor unless over if for negative conditions (or control flow or).

Style/NegatedIf: Favor `unless` over `if` for negative conditions.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gosh, these rubocop warnings are way noisier than I would like


raise FALoginCookieError.new(
'You must provide a valid login cookie in the header "FA_COOKIE".'\
Expand Down