
This is a hack to fix travis-ci/travis-web#123 easier. A proper solution would be to refactor how /branches work.
17 lines
328 B
Ruby
17 lines
328 B
Ruby
require 'travis/api/app'
|
|
|
|
class Travis::Api::App
|
|
class Endpoint
|
|
class Builds < Endpoint
|
|
get '/' do
|
|
name = params[:branches] ? :find_branches : :find_builds
|
|
respond_with service(name, params)
|
|
end
|
|
|
|
get '/:id' do
|
|
respond_with service(:find_build, params)
|
|
end
|
|
end
|
|
end
|
|
end
|