| @@ 93-98 (lines=6) @@ | ||
| 90 | public function postEditComment(Comment $comment, Request $request) |
|
| 91 | { |
|
| 92 | $body = ''; |
|
| 93 | if ($request->has('body')) { |
|
| 94 | $comment |
|
| 95 | ->updater($this->getLoggedUser()) |
|
| 96 | ->updateBody((string) $request->input('body'), $this->getLoggedUser()); |
|
| 97 | $body = \Html::format($comment->comment); |
|
| 98 | } |
|
| 99 | ||
| 100 | return response()->json(['text' => $body]); |
|
| 101 | } |
|
| @@ 314-319 (lines=6) @@ | ||
| 311 | public function postEditNote(Project $project, Note $note, Request $request) |
|
| 312 | { |
|
| 313 | $body = ''; |
|
| 314 | if ($request->has('body')) { |
|
| 315 | $note->setRelation('project', $project); |
|
| 316 | $note->updater($this->getLoggedUser())->updateBody($request->input('body'), $this->getLoggedUser()); |
|
| 317 | ||
| 318 | $body = \Html::format($note->body); |
|
| 319 | } |
|
| 320 | ||
| 321 | return response()->json(['status' => true, 'text' => $body]); |
|
| 322 | } |
|