From b21deccf2d76a0f8d00ab417a3609e4fb9d9bf98 Mon Sep 17 00:00:00 2001 From: Sven Fuchs Date: Wed, 26 Sep 2012 12:33:51 +0200 Subject: [PATCH] fix hooks --- lib/travis/api/app/endpoint/hooks.rb | 2 +- lib/travis/api/app/endpoint/profile.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/travis/api/app/endpoint/hooks.rb b/lib/travis/api/app/endpoint/hooks.rb index c28de0fa..cfea0a89 100644 --- a/lib/travis/api/app/endpoint/hooks.rb +++ b/lib/travis/api/app/endpoint/hooks.rb @@ -12,7 +12,7 @@ class Travis::Api::App # TODO: Add implementation and documentation. put('/:id', scope: :private) do - body service(:hooks).update(params) + body service(:hooks).update(params[:hook]) end end end diff --git a/lib/travis/api/app/endpoint/profile.rb b/lib/travis/api/app/endpoint/profile.rb index 2544f56b..74d45f9a 100644 --- a/lib/travis/api/app/endpoint/profile.rb +++ b/lib/travis/api/app/endpoint/profile.rb @@ -24,8 +24,7 @@ class Travis::Api::App body service(:user).find_one, type: :user end - put '/', scope: :private do -p params + put '/:id?', scope: :private do update_locale if valid_locale? 'ok' end