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:
@@ -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';
|
||||
|
26
src/flextype/routes/endpoints/utils.php
Normal file
26
src/flextype/routes/endpoints/utils.php
Normal 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']);
|
Reference in New Issue
Block a user