travis-api/lib/travis/api/app/endpoint/logs.rb
2013-02-10 21:30:50 +01:00

22 lines
563 B
Ruby

require 'travis/api/app'
class Travis::Api::App
class Endpoint
# Logs are generated by builds.
class Logs < Endpoint
# Fetches a log by it's *id*.
get '/:id' do |id|
respond_with service(:find_log, params)
end
put '/:id' do |id|
# TODO @rkh ... rather lost in the auth/scopes code.
token = env['HTTP_TOKEN']
halt 403, 'no token' unless token
halt 403, 'internal' unless token == Travis.config.tokens.internal
respond_with service(:update_log, params)
end
end
end
end