mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-16 02:08:40 +00:00
Pull out general functionality
This commit is contained in:
parent
faa061260b
commit
5dc24f5e46
|
|
@ -76,14 +76,8 @@ final class ApiController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$doc = $this->createDocFromRequest($request);
|
$doc = $this->createDocFromRequest($request);
|
||||||
|
$this->createModel($request, $doc, EditorDocMapper::class, 'doc');
|
||||||
EditorDocMapper::create($doc);
|
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Document', 'Document successfully created', $doc);
|
||||||
$response->set($request->getUri()->__toString(), [
|
|
||||||
'status' => NotificationLevel::OK,
|
|
||||||
'title' => 'Document',
|
|
||||||
'message' => 'Document successfully created.',
|
|
||||||
'response' => $doc->jsonSerialize()
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user