summaryrefslogtreecommitdiff
path: root/lib/api/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers')
-rw-r--r--lib/api/helpers/notes_helpers.rb2
-rw-r--r--lib/api/helpers/runner.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers/notes_helpers.rb b/lib/api/helpers/notes_helpers.rb
index b03ac7deb71..7124ac0c5c3 100644
--- a/lib/api/helpers/notes_helpers.rb
+++ b/lib/api/helpers/notes_helpers.rb
@@ -76,7 +76,7 @@ module API
def find_noteable(parent_type, parent_id, noteable_type, noteable_id)
params = params_by_noteable_type_and_id(noteable_type, noteable_id)
- noteable = NotesFinder.new(user_project, current_user, params).target
+ noteable = NotesFinder.new(current_user, params.merge(project: user_project)).target
noteable = nil unless can?(current_user, noteable_read_ability_name(noteable), noteable)
noteable || not_found!(noteable_type)
end
diff --git a/lib/api/helpers/runner.rb b/lib/api/helpers/runner.rb
index 100463fcb95..5b87eccf860 100644
--- a/lib/api/helpers/runner.rb
+++ b/lib/api/helpers/runner.rb
@@ -25,7 +25,7 @@ module API
end
def get_runner_ip
- { ip_address: env["action_dispatch.remote_ip"].to_s || request.ip }
+ { ip_address: ip_address }
end
def current_runner