Skip to content
This repository was archived by the owner on Jan 18, 2018. It is now read-only.

Commit 05d0eaf

Browse files
Return the correct status code for created
1 parent 4990a9c commit 05d0eaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controllers/CommentController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function store($post_id)
151151

152152
$comment = $this->commentprovider->create($input);
153153

154-
return Response::json(array('success' => true, 'msg' => 'Comment created successfully.', 'contents' => $this->viewer->getView()->make('posts.comment', array('comment' => $comment, 'post_id' => $post_id))->render(), 'comment_id' => $comment->id));
154+
return Response::json(array('success' => true, 'msg' => 'Comment created successfully.', 'contents' => $this->viewer->getView()->make('posts.comment', array('comment' => $comment, 'post_id' => $post_id))->render(), 'comment_id' => $comment->id), 201);
155155
}
156156

157157
/**

0 commit comments

Comments
 (0)