travis-api/lib/travis/api/app/endpoint/logs.rb
Hiro Asari cc03c5458a DRY up log patching logic
Move the shared logic into a Helpers method so that there is no
code duplication
2014-06-11 18:07:12 -04:00

21 lines
463 B
Ruby

require 'travis/api/app'
class Travis::Api::App
class Endpoint
# Logs are generated by builds.
class Logs < Endpoint
include Helpers
# Fetches a log by its *id*.
get '/:id' do |id|
respond_with service(:find_log, params)
end
# 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)
end
end
end
end