Skip to content

Commit

Permalink
fix schema api legacy method call
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Dec 28, 2015
1 parent a1eb896 commit 363d799
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions library/PSX/Controller/SchemaApiAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ public function onPost()

// compatibility layer to transition from doCreate to doPost. The
// doCreate call will be removed in the next major version
if (method_exists($this, 'doPost')) {
$response = $this->doPost($record, $this->version);
} else {
if (method_exists($this, 'doCreate')) {
$response = $this->doCreate($record, $this->version);
} else {
$response = $this->doPost($record, $this->version);
}

$this->sendResponse($method, $response);
Expand All @@ -142,10 +142,10 @@ public function onPut()

// compatibility layer to transition from doUpdate to doPut. The
// doUpdate call will be removed in the next major version
if (method_exists($this, 'doPut')) {
$response = $this->doPut($record, $this->version);
} else {
if (method_exists($this, 'doUpdate')) {
$response = $this->doUpdate($record, $this->version);
} else {
$response = $this->doPut($record, $this->version);
}

$this->sendResponse($method, $response);
Expand Down

0 comments on commit 363d799

Please sign in to comment.