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)
{
if (!empty($val = $this->validateEditorCreate($request))) {
$response->set('editor_create', new FormValidation($val));
if (!empty($val = $this->validateCommentCreate($request))) {
$response->set('comment_create', new FormValidation($val));
return;
}
$editorArticle = new Editor();
$comment = new Comment();
EditorMapper::create($editorArticle);
CommentMapper::create($comment);
$response->set('editor', $editorArticle->jsonSerialize());
$response->set('comment', $comment->jsonSerialize());
}
}