mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-08 22:07:56 +00:00
fix API_ENABLED condition
This commit is contained in:
parent
13431008c4
commit
0df47efa8b
@ -9,13 +9,7 @@ require_once('../library/parser.php');
|
|||||||
require_once('../library/mysql.php');
|
require_once('../library/mysql.php');
|
||||||
require_once('../library/sphinxql.php');
|
require_once('../library/sphinxql.php');
|
||||||
|
|
||||||
if (!API_ENABLED) {
|
if (API_ENABLED) {
|
||||||
|
|
||||||
$response = [
|
|
||||||
'status' => false,
|
|
||||||
'message' => _('API requests disabled by the node owner.'),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Action
|
// Action
|
||||||
switch (!empty($_GET['action']) ? $_GET['action'] : false) {
|
switch (!empty($_GET['action']) ? $_GET['action'] : false) {
|
||||||
@ -80,6 +74,14 @@ switch (!empty($_GET['action']) ? $_GET['action'] : false) {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$response = [
|
||||||
|
'status' => false,
|
||||||
|
'message' => _('API requests disabled by the node owner.'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
header('Content-Type: application/json; charset=utf-8');
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user