fix accounts and hooks endpoints
This commit is contained in:
parent
f2e8ccafc1
commit
fbd89ceeb0
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user