mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 08:54:10 +00:00
feature(rest) get: add config
This commit is contained in:
parent
e1b0b939eb
commit
1b9bdd26a7
2 changed files with 10 additions and 1 deletions
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue