mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-08-26 13:51:55 +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/sphinxql.php');
|
||||
|
||||
if (!API_ENABLED) {
|
||||
|
||||
$response = [
|
||||
'status' => false,
|
||||
'message' => _('API requests disabled by the node owner.'),
|
||||
];
|
||||
}
|
||||
if (API_ENABLED) {
|
||||
|
||||
// Action
|
||||
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
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user