diff --git a/lib/client.js b/lib/client.js index a0761960..cdcc07ee 100644 --- a/lib/client.js +++ b/lib/client.js @@ -307,7 +307,7 @@ var Util, DOM, CloudFunc; } this.setConfig = function(config) { Config = config; }; - this.getConfig = getSystemFile(Config, DIR_JSON + 'config.json'); + this.getConfig = getSystemFile(Config, '/api/v1/config'); this.getModules = getSystemFile(Modules, DIR_JSON + 'modules.json'); this.getExt = getSystemFile(Extensions, DIR_JSON + 'ext.json'); this.getFileTemplate = getSystemFile(FileTemplate, DIR_HTML_FS + 'file.html'); diff --git a/lib/server/rest.js b/lib/server/rest.js index 4153df08..55ce81e3 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -244,6 +244,15 @@ send(p); break; + case 'config': + main.sendFile({ + name : JSONDIR + 'config.json', + request : p.request, + response: p.response, + cache : false + }); + break; + default: json = Util.stringifyJSON({ error: 'command not found'