1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-07 05:36:54 +02:00

feat(endpoints): add utils endpoints routes #565

This commit is contained in:
Awilum
2021-08-10 12:02:18 +03:00
parent 0f84b3758d
commit b38bbf3366
2 changed files with 27 additions and 0 deletions

View File

@@ -447,6 +447,7 @@ plugins()->init();
/**
* Include API ENDPOINTS
*/
require_once ROOT_DIR . '/src/flextype/routes/endpoints/utils.php';
//include_once ROOT_DIR . '/src/flextype/Endpoints/errors.php';
//include_once ROOT_DIR . '/src/flextype/Endpoints/images.php';
//include_once ROOT_DIR . '/src/flextype/Endpoints/utils.php';

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
/**
* Flextype (https://flextype.org)
* Founded by Sergey Romanenko and maintained by Flextype Community.
*/
namespace Flextype;
use Flextype\Endpoints\Utils;
/**
* Clear cache
*
* endpoint: POST /api/utils/cache/clear
*
* Body:
* token - [REQUIRED] - Valid public token.
* access_token - [REQUIRED] - Valid access token.
*
* Returns:
* Returns an empty body with HTTP status 204
*/
app()->post('/api/utils/cache/clear', [Utils::class, 'clearCache']);