Skip to content

Commit 45d59e9

Browse files
committed
App support for Rest and GraphQL
1 parent 0a2e0b2 commit 45d59e9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

index.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,18 @@ function is_installed() {
4343

4444
if (! defined('APP')) {
4545
if (is_installed()) {
46-
define('APP', 'app');
46+
$app = 'app';
47+
$url = $_SERVER['REQUEST_URI'] ?? '';
48+
49+
if (REST && substr_compare($url, '/rest',0 ,5) === 0) {
50+
$app = 'rest';
51+
} else {
52+
if (GRAPHQL && substr_compare($url, '/graphql', 0, 8) === 0) {
53+
$app = 'graphql';
54+
}
55+
}
56+
57+
define('APP', $app);
4758
} else {
4859
define('APP', 'install');
4960

0 commit comments

Comments
 (0)