Fix types

This commit is contained in:
Dennis Eichhorn 2017-11-17 19:34:52 +01:00
parent d7ee8f2c70
commit 7ce11b8928

View File

@ -161,17 +161,17 @@ class Controller extends ModuleAbstract implements WebInterface
*/ */
public function apiCommentCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) public function apiCommentCreate(RequestAbstract $request, ResponseAbstract $response, $data = null)
{ {
if (!empty($val = $this->validateEditorCreate($request))) { if (!empty($val = $this->validateCommentCreate($request))) {
$response->set('editor_create', new FormValidation($val)); $response->set('comment_create', new FormValidation($val));
return; return;
} }
$editorArticle = new Editor(); $comment = new Comment();
EditorMapper::create($editorArticle); CommentMapper::create($comment);
$response->set('editor', $editorArticle->jsonSerialize()); $response->set('comment', $comment->jsonSerialize());
} }
} }