summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2017-08-28 17:13:22 +0200
committerRobert Schilling <rschilling@student.tugraz.at>2017-08-29 10:12:10 +0200
commitee4820a5268d02fb7ed142511d1a194f06629a1e (patch)
treedfca250f557830c030c21941bf8ab7ca8d5e829c /lib/api/projects.rb
parent8bd9fb4cc4f8689a23c68e1b7f893ee59907069f (diff)
downloadgitlab-ce-ee4820a5268d02fb7ed142511d1a194f06629a1e.tar.gz
Add a spec when ressource is not modified
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 78e25b6da03..78d900984ac 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -365,8 +365,7 @@ module API
authorize! :remove_fork_project, user_project
if user_project.forked?
- status 204
- user_project.forked_project_link.destroy
+ destroy_conditionally!(user_project.forked_project_link)
else
not_modified!
end
@@ -410,8 +409,7 @@ module API
link = user_project.project_group_links.find_by(group_id: params[:group_id])
not_found!('Group Link') unless link
- status 204
- link.destroy
+ destroy_conditionally!(link)
end
desc 'Upload a file'