Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

App support for Rest and GraphQL

givanz45d59e9b9c7c
diff --git a/index.php b/index.php
index 50fb7ec..04b0f0e 100755
--- a/index.php
+++ b/index.php
@@ -43,7 +43,18 @@ $installPathRedirect = (V_SUBDIR_INSTALL ? V_SUBDIR_INSTALL : '') . '/install/in
if (! defined('APP')) {
if (is_installed()) {
- define('APP', 'app');
+ $app = 'app';
+ $url = $_SERVER['REQUEST_URI'] ?? '';
+
+ if (REST && substr_compare($url, '/rest',0 ,5) === 0) {
+ $app = 'rest';
+ } else {
+ if (GRAPHQL && substr_compare($url, '/graphql', 0, 8) === 0) {
+ $app = 'graphql';
+ }
+ }
+
+ define('APP', $app);
} else {
define('APP', 'install');