mirror of
https://github.com/flextype/flextype.git
synced 2025-08-27 15:00:11 +02:00
refactor(core): move Access API in the it is own endpoint folder
This commit is contained in:
@@ -128,6 +128,7 @@ include_once 'dependencies.php';
|
||||
/**
|
||||
* Include API ENDPOINTS
|
||||
*/
|
||||
include_once 'endpoints/access/access.php';
|
||||
include_once 'endpoints/delivery/entries.php';
|
||||
include_once 'endpoints/delivery/registry.php';
|
||||
include_once 'endpoints/delivery/config.php';
|
||||
|
21
src/flextype/endpoints/access/access.php
Normal file
21
src/flextype/endpoints/access/access.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Flextype (http://flextype.org)
|
||||
* Founded by Sergey Romanenko and maintained by Flextype Community.
|
||||
*/
|
||||
|
||||
namespace Flextype;
|
||||
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
/**
|
||||
* Validate access token
|
||||
*/
|
||||
function validate_access_token($token) : bool
|
||||
{
|
||||
return Filesystem::has(PATH['project'] . '/tokens/access/' . $token . '/token.yaml');
|
||||
}
|
@@ -29,14 +29,6 @@ function validate_management_entries_token($token) : bool
|
||||
return Filesystem::has(PATH['project'] . '/tokens/management/entries/' . $token . '/token.yaml');
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate access token
|
||||
*/
|
||||
function validate_access_token($token) : bool
|
||||
{
|
||||
return Filesystem::has(PATH['project'] . '/tokens/access/' . $token . '/token.yaml');
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch entry(entries)
|
||||
*
|
||||
|
Reference in New Issue
Block a user