mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-01-26 00:08:42 +00:00
typo fixes
This commit is contained in:
parent
bf076fa7c2
commit
0db74b35c9
|
|
@ -105,7 +105,7 @@ final class ApiController extends Controller
|
|||
{
|
||||
$doc = new EditorDoc();
|
||||
$doc->title = (string) ($request->getData('title') ?? '');
|
||||
$doc->plaint = (string) ($request->getData('plain') ?? '');
|
||||
$doc->plain = (string) ($request->getData('plain') ?? '');
|
||||
$doc->content = Markdown::parse((string) ($request->getData('plain') ?? ''));
|
||||
$doc->setVirtualPath((string) ($request->getData('virtualpath') ?? '/'));
|
||||
$doc->createdBy = new NullAccount($request->header->account);
|
||||
|
|
@ -165,7 +165,7 @@ final class ApiController extends Controller
|
|||
/** @var \Modules\Editor\Models\EditorDoc $doc */
|
||||
$doc = EditorDocMapper::get((int) $request->getData('id'));
|
||||
$doc->title = (string) ($request->getData('title') ?? $doc->title);
|
||||
$doc->plaint = (string) ($request->getData('plain') ?? $doc->plain);
|
||||
$doc->plain = (string) ($request->getData('plain') ?? $doc->plain);
|
||||
$doc->content = Markdown::parse((string) ($request->getData('plain') ?? $doc->plain));
|
||||
|
||||
return $doc;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class EditorDocTest extends \PHPUnit\Framework\TestCase
|
|||
$this->doc->createdBy = new NullAccount(1);
|
||||
$this->doc->title = 'Title';
|
||||
$this->doc->content = 'Content';
|
||||
$this->doc->plaint = 'Plain';
|
||||
$this->doc->plain = 'Plain';
|
||||
$this->doc->setVirtualPath('/some/path');
|
||||
$arr = [
|
||||
'id' => 0,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user