API: fixed adding a note
Now the correct attribute is checked if it's available or not. Also fixed a test.
This commit is contained in:
parent
3bb342b961
commit
d269d107d8
2 changed files with 2 additions and 3 deletions
|
@ -93,7 +93,7 @@ module Gitlab
|
|||
# POST /projects/:id/issues/:noteable_id/notes
|
||||
# POST /projects/:id/snippets/:noteable_id/notes
|
||||
post ":id/#{noteables_str}/:#{noteable_id_str}/notes" do
|
||||
required_attributes! [:"#{noteable_id_str}"]
|
||||
required_attributes! [:body]
|
||||
|
||||
@noteable = user_project.send(:"#{noteables_str}").find(params[:"#{noteable_id_str}"])
|
||||
@note = @noteable.notes.new(note: params[:body])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue