mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-08-30 07:42:20 +00:00
fix API_ENABLED condition
This commit is contained in:
parent
13431008c4
commit
0df47efa8b
@ -9,16 +9,10 @@ require_once('../library/parser.php');
|
||||
require_once('../library/mysql.php');
|
||||
require_once('../library/sphinxql.php');
|
||||
|
||||
if (!API_ENABLED) {
|
||||
if (API_ENABLED) {
|
||||
|
||||
$response = [
|
||||
'status' => false,
|
||||
'message' => _('API requests disabled by the node owner.'),
|
||||
];
|
||||
}
|
||||
|
||||
// Action
|
||||
switch (!empty($_GET['action']) ? $_GET['action'] : false) {
|
||||
// Action
|
||||
switch (!empty($_GET['action']) ? $_GET['action'] : false) {
|
||||
|
||||
// Search API
|
||||
case 'search';
|
||||
@ -78,6 +72,14 @@ switch (!empty($_GET['action']) ? $_GET['action'] : false) {
|
||||
'status' => false,
|
||||
'message' => _('Undefined API action request.'),
|
||||
];
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$response = [
|
||||
'status' => false,
|
||||
'message' => _('API requests disabled by the node owner.'),
|
||||
];
|
||||
}
|
||||
|
||||
// Output
|
||||
|
Loading…
x
Reference in New Issue
Block a user