mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
Merge branch 'fix'
This commit is contained in:
@@ -173,6 +173,10 @@ class RecordBase extends Base implements
|
||||
*/
|
||||
public function postActionCreate(Request $request, Response $response): stdClass
|
||||
{
|
||||
if ($request->getHeader('Content-Type') !== 'application/json') {
|
||||
throw new BadRequest("Not supported content type.");
|
||||
}
|
||||
|
||||
if (method_exists($this, 'actionCreate')) {
|
||||
// For backward compatibility.
|
||||
return (object) $this->actionCreate($request->getRouteParams(), $request->getParsedBody(), $request);
|
||||
|
||||
Reference in New Issue
Block a user