fix accounts and hooks endpoints

This commit is contained in:
Sven Fuchs 2012-09-27 17:14:50 +02:00
parent f2e8ccafc1
commit fbd89ceeb0
3 changed files with 3 additions and 4 deletions

View File

@ -4,7 +4,7 @@ class Travis::Api::App
class Endpoint
class Accounts < Endpoint
get '/', scope: :private do
body service(:account).find_all, type: :account
body service(:account).find_all, type: :accounts
end
end
end

View File

@ -115,7 +115,7 @@ class Travis::Api::App
get '/post_message' do
handshake do |user, token, target_origin|
halt 403, invalid_target(target_origin) unless target_ok? target_origin
rendered_user = Travis::Api.data(service(:user, user).find_one, type: :user, version: :v2)
rendered_user = Travis::Api.data(user, version: :v2)
post_message(token: token, user: rendered_user, target_origin: target_origin)
end
end

View File

@ -5,8 +5,7 @@ class Travis::Api::App
# TODO: Add documentation.
class Hooks < Endpoint
# TODO: Add implementation and documentation.
# TODO scope: :private
get('/') do
get('/', scope: :private) do
body service(:hooks).find_all(params), type: :hooks
end