Skip to content

Commit

Permalink
API Move const into FormSchema class in framework
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Feb 23, 2025
1 parent 08e1047 commit fc62b3e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions code/FormSchemaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
*/
abstract class FormSchemaController extends AdminController
{
/**
* Form schema header identifier
*/
public const SCHEMA_HEADER = 'X-Formschema-Request';

private static array $allowed_actions = [
'schema',
];
Expand Down Expand Up @@ -113,7 +108,7 @@ public function schema(HTTPRequest $request): HTTPResponse
*/
public function getSchemaResponse(string $schemaID, ?Form $form = null, ?ValidationResult $errors = null, array $extraData = []): HTTPResponse
{
$parts = $this->getRequest()->getHeader(static::SCHEMA_HEADER);
$parts = $this->getRequest()->getHeader(FormSchema::SCHEMA_HEADER);
$data = $this
->getFormSchema()
->getMultipartSchema($parts, $schemaID, $form, $errors);
Expand All @@ -133,7 +128,7 @@ public function getSchemaResponse(string $schemaID, ?Form $form = null, ?Validat
*/
protected function getSchemaRequested(): bool
{
$parts = $this->getRequest()->getHeader(static::SCHEMA_HEADER);
$parts = $this->getRequest()->getHeader(FormSchema::SCHEMA_HEADER);
return !empty($parts);
}

Expand Down

0 comments on commit fc62b3e

Please sign in to comment.