| @@ 89-93 (lines=5) @@ | ||
| 86 | public function postEditComment(Comment $comment, Request $request) |
|
| 87 | { |
|
| 88 | $body = ''; |
|
| 89 | if ($request->has('body')) { |
|
| 90 | $comment->setRelation('user', $this->auth->user()); |
|
| 91 | $comment->updateBody($request->input('body')); |
|
| 92 | $body = \Html::format($comment->comment); |
|
| 93 | } |
|
| 94 | ||
| 95 | return response()->json(['text' => $body]); |
|
| 96 | } |
|
| @@ 308-314 (lines=7) @@ | ||
| 305 | public function postEditNote(Project $project, Project\Note $note, Request $request) |
|
| 306 | { |
|
| 307 | $body = ''; |
|
| 308 | if ($request->has('body')) { |
|
| 309 | $note->setRelation('createdBy', $this->auth->user()); |
|
| 310 | $note->setRelation('project', $project); |
|
| 311 | $note->updateBody($request->input('body')); |
|
| 312 | ||
| 313 | $body = \Html::format($note->body); |
|
| 314 | } |
|
| 315 | ||
| 316 | return response()->json(['status' => true, 'text' => $body]); |
|
| 317 | } |
|