From fc70631fcd985a8dda7917d57d019dcb1cc0fa68 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 27 Jun 2020 20:54:10 +0300 Subject: [PATCH] feat(rest-api): Moving from CDA and CMA to more universal format of REST API'S #435 --- src/flextype/endpoints/entries.php | 6 ------ src/flextype/endpoints/files.php | 6 ------ src/flextype/endpoints/images.php | 6 ------ src/flextype/endpoints/registry.php | 6 ------ 4 files changed, 24 deletions(-) diff --git a/src/flextype/endpoints/entries.php b/src/flextype/endpoints/entries.php index 48201ddf..263abfbc 100644 --- a/src/flextype/endpoints/entries.php +++ b/src/flextype/endpoints/entries.php @@ -15,12 +15,6 @@ use Psr\Http\Message\ServerRequestInterface as Request; use function array_replace_recursive; use function count; -/** - * API sys messages - */ -$api_sys_messages['AccessTokenInvalid'] = ['sys' => ['type' => 'Error', 'id' => 'AccessTokenInvalid'], 'message' => 'The access token you sent could not be found or is invalid.']; -$api_sys_messages['NotFound'] = ['sys' => ['type' => 'Error', 'id' => 'NotFound'], 'message' => 'The resource could not be found.']; - /** * Validate entries entries token */ diff --git a/src/flextype/endpoints/files.php b/src/flextype/endpoints/files.php index 76381e4f..a66880af 100644 --- a/src/flextype/endpoints/files.php +++ b/src/flextype/endpoints/files.php @@ -14,12 +14,6 @@ use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use function array_replace_recursive; -/** - * API sys messages - */ -$api_sys_messages['AccessTokenInvalid'] = ['sys' => ['type' => 'Error', 'id' => 'AccessTokenInvalid'], 'message' => 'The access token you sent could not be found or is invalid.']; -$api_sys_messages['NotFound'] = ['sys' => ['type' => 'Error', 'id' => 'NotFound'], 'message' => 'The resource could not be found.']; - /** * Validate files token */ diff --git a/src/flextype/endpoints/images.php b/src/flextype/endpoints/images.php index 34849713..38d365ea 100644 --- a/src/flextype/endpoints/images.php +++ b/src/flextype/endpoints/images.php @@ -23,12 +23,6 @@ function validate_images_token($token) : bool return Filesystem::has(PATH['project'] . '/tokens/images/' . $token . '/token.yaml'); } -/** - * API sys messages - */ -$api_sys_messages['AccessTokenInvalid'] = ['sys' => ['type' => 'Error', 'id' => 'AccessTokenInvalid'], 'message' => 'The access token you sent could not be found or is invalid.']; -$api_sys_messages['NotFound'] = ['sys' => ['type' => 'Error', 'id' => 'NotFound'], 'message' => 'The resource could not be found.']; - /** * Fetch image * diff --git a/src/flextype/endpoints/registry.php b/src/flextype/endpoints/registry.php index 66b7ae82..57f734dc 100644 --- a/src/flextype/endpoints/registry.php +++ b/src/flextype/endpoints/registry.php @@ -14,12 +14,6 @@ use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use function array_replace_recursive; -/** - * API sys messages - */ -$api_sys_messages['AccessTokenInvalid'] = ['sys' => ['type' => 'Error', 'id' => 'AccessTokenInvalid'], 'message' => 'The access token you sent could not be found or is invalid.']; -$api_sys_messages['NotFound'] = ['sys' => ['type' => 'Error', 'id' => 'NotFound'], 'message' => 'The resource could not be found.']; - /** * Validate registry token */