diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-17 10:45:05 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-21 17:44:44 +0100 |
commit | 55f2425a678b61178d46e50f2b5a2da929228f52 (patch) | |
tree | 467d77c5a37a2101fda87be193563b11987c4f35 /lib/api/subscriptions.rb | |
parent | 316a7312341fd2d359b44da3f386c3739c1bdb4d (diff) | |
download | gitlab-ce-55f2425a678b61178d46e50f2b5a2da929228f52.tar.gz |
API: Make subscription API more RESTfuL
Diffstat (limited to 'lib/api/subscriptions.rb')
-rw-r--r-- | lib/api/subscriptions.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/subscriptions.rb b/lib/api/subscriptions.rb index e11d7537cc9..acf11dbdf26 100644 --- a/lib/api/subscriptions.rb +++ b/lib/api/subscriptions.rb @@ -21,7 +21,7 @@ module API desc 'Subscribe to a resource' do success entity_class end - post ":id/#{type}/:subscribable_id/subscription" do + post ":id/#{type}/:subscribable_id/subscribe" do resource = instance_exec(params[:subscribable_id], &finder) if resource.subscribed?(current_user, user_project) @@ -35,7 +35,7 @@ module API desc 'Unsubscribe from a resource' do success entity_class end - delete ":id/#{type}/:subscribable_id/subscription" do + post ":id/#{type}/:subscribable_id/unsubscribe" do resource = instance_exec(params[:subscribable_id], &finder) if !resource.subscribed?(current_user, user_project) |