mirror of
https://github.com/flextype/flextype.git
synced 2025-08-08 06:06:45 +02:00
feat(core): Rest API endpoints should includes after plugins initialisation. #506
This commit is contained in:
@@ -118,17 +118,6 @@ flextype('session')->setOptions(flextype('registry')->get('flextype.settings.ses
|
||||
*/
|
||||
flextype('session')->start();
|
||||
|
||||
/**
|
||||
* Include API ENDPOINTS
|
||||
*/
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/Utils/errors.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/Utils/access.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/entries.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/registry.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/files.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/folders.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/images.php';
|
||||
|
||||
/**
|
||||
* Set internal encoding
|
||||
*/
|
||||
@@ -180,6 +169,19 @@ foreach ($entryFields as $fieldName => $field) {
|
||||
*/
|
||||
flextype('plugins')->init();
|
||||
|
||||
/**
|
||||
* Include API ENDPOINTS
|
||||
*/
|
||||
if (flextype()->isApiRequest()) {
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/Utils/errors.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/Utils/access.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/entries.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/registry.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/files.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/folders.php';
|
||||
include_once ROOT_DIR . '/src/flextype/Endpoints/images.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable lazy CORS
|
||||
*
|
||||
|
Reference in New Issue
Block a user