summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2016-04-06 19:04:17 +0200
committerRobert Schilling <rschilling@student.tugraz.at>2016-04-12 14:24:05 +0200
commit9aefaa41ab1442f81ffc15ad9a8279bd1e92c91a (patch)
tree581326d413b1d83d237186c6a123da50787d3104 /lib
parentba21c00f01bf4274d0e4cc3892293fc1e581b260 (diff)
downloadgitlab-ce-9aefaa41ab1442f81ffc15ad9a8279bd1e92c91a.tar.gz
Fix code review issues
Diffstat (limited to 'lib')
-rw-r--r--lib/api/notes.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb
index fd1704d395c..2ed986b9ec5 100644
--- a/lib/api/notes.rb
+++ b/lib/api/notes.rb
@@ -112,10 +112,9 @@ module API
end
end
- # Delete a +notable+ note
+ # Delete a +noteable+ note
#
# Parameters:
- # Parameters:
# id (required) - The ID of a project
# noteable_id (required) - The ID of an issue, MR, or snippet
# node_id (required) - The ID of a note
@@ -124,10 +123,9 @@ module API
# DELETE /projects/:id/snippets/:noteable_id/notes/:node_id
delete ":id/#{noteables_str}/:#{noteable_id_str}/notes/:note_id" do
note = user_project.notes.find(params[:note_id])
- not_found!('Note') unless note
authorize! :admin_note, note
::Notes::DeleteService.new(user_project, current_user).execute(note)
- true
+ present note, with: Entities::Note
end
end
end