travis-api/lib/travis/api/app/endpoint/builds.rb
Piotr Sarnacki f2d768080f Return last builds on each branch for /builds?branches=true
This is a hack to fix travis-ci/travis-web#123 easier. A proper solution
would be to refactor how /branches work.
2013-01-26 01:12:47 +01:00

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