Skip to content

Commit

Permalink
API Stop using deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 2, 2022
1 parent 4374a69 commit dca7a8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Controllers/ElementalAreaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function apiSaveForm(HTTPRequest $request)
return null;
}

$data = Convert::json2array($request->getBody());
$data = json_decode($request->getBody(), true);
if (empty($data)) {
$this->jsonError(400);
return null;
Expand Down Expand Up @@ -166,7 +166,7 @@ public function apiSaveForm(HTTPRequest $request)
return null;
}

$body = Convert::raw2json([
$body = json_encode([
'status' => 'success',
'updated' => $updated,
]);
Expand Down
2 changes: 0 additions & 2 deletions tests/ElementControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class ElementControllerTest extends FunctionalTest
{
protected static $fixture_file = 'ElementControllerTest.yml';

protected static $use_draft_site = true;

protected static $required_extensions = [
TestPage::class => [
ElementalPageExtension::class,
Expand Down

0 comments on commit dca7a8d

Please sign in to comment.