Commit f34e9ad3a135ee8c05b9cab16c1bcde6df06851a
Committed by
Rodrigo Souto
1 parent
c42ac8b4
Exists in
api_tasks
and in
4 other branches
solving bug create comment with person not user
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
lib/api/helpers.rb
lib/api/v1/comments.rb
@@ -28,7 +28,7 @@ module API | @@ -28,7 +28,7 @@ module API | ||
28 | # Example Request: | 28 | # Example Request: |
29 | # POST api/v1/articles/12/comments?private_toke=234298743290432&body=new comment | 29 | # POST api/v1/articles/12/comments?private_toke=234298743290432&body=new comment |
30 | post ":id/comments" do | 30 | post ":id/comments" do |
31 | - present environment.articles.find(params[:id]).comments.create(:author => current_user, :body => params[:body]), :with => Entities::Comment | 31 | + present environment.articles.find(params[:id]).comments.create(:author => current_person, :body => params[:body]), :with => Entities::Comment |
32 | end | 32 | end |
33 | end | 33 | end |
34 | 34 |