feature(rest) get: add config

This commit is contained in:
coderaiser 2014-04-24 10:15:58 -04:00
parent e1b0b939eb
commit 1b9bdd26a7
2 changed files with 10 additions and 1 deletions

View file

@ -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');

View file

@ -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'