Skip to content

Commit

Permalink
Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed Dec 14, 2017
1 parent 9b7300c commit 6c3bdbc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Metrics/LineLength:
Metrics/ClassLength:
Enabled: false
Metrics/BlockLength:
Max: 30
ExcludedMethods:
- scope
- configure
Expand Down
28 changes: 14 additions & 14 deletions app/api/api/posts_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,24 @@ class PostsAPI < API::Base

if current_user.api_token.blank?
error!({
error_name: 'not_write_authenticated',
error_code: 409,
error_message: 'Current user is not write-authenticated.'
}, 409)
error_name: 'not_write_authenticated',
error_code: 409,
error_message: 'Current user is not write-authenticated.'
}, 409)
end

status, message = current_user.spam_flag(post, false)
FlagLog.create(
success: status,
error_message: status.present? ? nil : message,
is_dry_run: false,
flag_condition: nil,
user: @user,
post: @post,
backoff: status.present? ? message : 0,
site_id: @post.site_id,
is_auto: false,
api_key: @key
success: status,
error_message: status.present? ? nil : message,
is_dry_run: false,
flag_condition: nil,
user: @user,
post: @post,
backoff: status.present? ? message : 0,
site_id: @post.site_id,
is_auto: false,
api_key: @key
)
if status
{ status: 'success', backoff: message }
Expand Down

0 comments on commit 6c3bdbc

Please sign in to comment.