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