Tweak RemoveLog helper
Leave responding up to the endpoint Remove unnecessary parameter from the helper's parameter
This commit is contained in:
parent
cc03c5458a
commit
477c8b9212
|
@ -67,7 +67,7 @@ class Travis::Api::App
|
|||
end
|
||||
|
||||
patch '/:id/log', scope: :private do |id|
|
||||
patch_log_for_job(id, params)
|
||||
respond_with patch_log_for_job(params)
|
||||
end
|
||||
|
||||
get "/:job_id/annotations" do
|
||||
|
|
|
@ -12,8 +12,8 @@ class Travis::Api::App
|
|||
|
||||
# Clears up the content of the log by the *job id*
|
||||
# Optionally takes parameter *reason*
|
||||
patch '/:id' do |id|
|
||||
patch_log_for_job(id, params)
|
||||
patch '/:id' do
|
||||
respond_with patch_log_for_job(params)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,9 +5,8 @@ class Travis::Api::App
|
|||
module Helpers
|
||||
Backports.require_relative_dir 'helpers'
|
||||
|
||||
def patch_log_for_job(id, params)
|
||||
result = self.service(:remove_log, params)
|
||||
respond_with result
|
||||
def patch_log_for_job(params)
|
||||
self.service(:remove_log, params).run
|
||||
rescue Travis::AuthorizationDenied => ade
|
||||
status 401
|
||||
{ error: { message: ade.message } }
|
||||
|
|
Loading…
Reference in New Issue
Block a user