Prefer follower also for /repos/id and repos list

This commit is contained in:
Piotr Sarnacki 2013-09-04 20:32:30 +02:00
parent 59cd6bac8f
commit b484a19f27

View File

@ -13,8 +13,10 @@ class Travis::Api::App
# #
# json(:repositories) # json(:repositories)
get '/' do get '/' do
prefer_follower do
respond_with service(:find_repos, params) respond_with service(:find_repos, params)
end end
end
# Gets the repository with the given id. # Gets the repository with the given id.
# #
@ -22,8 +24,10 @@ class Travis::Api::App
# #
# json(:repository) # json(:repository)
get '/:id' do get '/:id' do
prefer_follower do
respond_with service(:find_repo, params) respond_with service(:find_repo, params)
end end
end
get '/:id/cc' do get '/:id/cc' do
respond_with service(:find_repo, params.merge(schema: 'cc')) respond_with service(:find_repo, params.merge(schema: 'cc'))