diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-13 16:30:20 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-13 17:15:42 +0200 |
commit | a9200d93d3e3d586302887fcaa0cf8f5fbd9a613 (patch) | |
tree | 52c4b9e8783c5787c61fe57aa9e53bd3260925df /lib/api | |
parent | fa3009095fbb995550a20e5d0cbc994f4290fbea (diff) | |
download | gitlab-ce-a9200d93d3e3d586302887fcaa0cf8f5fbd9a613.tar.gz |
Ensure that issues and merge requests are found
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/issues.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb index 37d25073074..4cdecadfe0f 100644 --- a/lib/api/issues.rb +++ b/lib/api/issues.rb @@ -239,8 +239,8 @@ module API # issue_id (required) - The ID of a project issue # Example Request: # POST /projects/:id/issues/:issue_id/subscription - post ":id/issues/:issue_id/subscription" do - issue = user_project.issues.find_by(id: params[:issue_id]) + post ':id/issues/:issue_id/subscription' do + issue = user_project.issues.find(params[:issue_id]) if issue.subscribed?(current_user) not_modified! @@ -257,8 +257,8 @@ module API # issue_id (required) - The ID of a project issue # Example Request: # DELETE /projects/:id/issues/:issue_id/subscription - delete ":id/issues/:issue_id/subscription" do - issue = user_project.issues.find_by(id: params[:issue_id]) + delete ':id/issues/:issue_id/subscription' do + issue = user_project.issues.find(params[:issue_id]) if issue.subscribed?(current_user) issue.unsubscribe(current_user) |