Move of API folder from /app/front/api to app/api

This commit is contained in:
jokob-sk
2024-12-08 19:17:10 +11:00
parent d7858c6042
commit f7160f0843
27 changed files with 115 additions and 75 deletions

View File

@@ -17,7 +17,7 @@ checkPermissions([$dbPath, $confPath]);
// get settings from the API json file
// path to your JSON file
$file = '../front/api/table_settings.json';
$file = '../api/table_settings.json';
// put the content of the file in a variable
$data = file_get_contents($file);
// JSON decode
@@ -219,7 +219,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
}, 3000);
} else
{
$.get('api/plugins.json?nocache=' + Date.now(), function(res) {
$.get('/php/server/query_json.php', { file: 'plugins.json', nocache: Date.now() }, function(res) {
pluginsData = res["data"];
@@ -556,7 +556,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
// collect values for each of the different input form controls
// get settings to determine setting type to store values appropriately
$.get('api/table_settings.json?nocache=' + Date.now(), function(res) {
$.get('/php/server/query_json.php', { file: 'table_settings.json', nocache: Date.now() }, function(res) {
// loop through the settings definitions from the json
res["data"].forEach(set => {
@@ -733,7 +733,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
} else
{
// check if config file has been updated
$.get('api/app_state.json?nocache=' + Date.now(), function(appState) {
$.get('/php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) {
fileModificationTime = <?php echo filemtime($confPath)*1000;?>;