mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(rest) JSONDIR -> DIR_JSON
This commit is contained in:
parent
d7e3e55445
commit
283541795f
1 changed files with 4 additions and 4 deletions
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
DIR = './',
|
||||
DIR_LIB = DIR + '../',
|
||||
DIR_ROOT = __dirname + '/' + DIR_LIB + '../',
|
||||
DIR_JSON = DIR_ROOT + 'json/',
|
||||
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
|
|
@ -30,8 +32,6 @@
|
|||
onDelete = main.srvrequire('rest/fs/delete').onDelete,
|
||||
markdown = main.srvrequire('rest/markdown'),
|
||||
|
||||
JSONDIR = main.JSONDIR,
|
||||
|
||||
flop = require(DIR + 'flop'),
|
||||
pack = require(DIR + 'pack'),
|
||||
mellow = require(DIR + 'mellow'),
|
||||
|
|
@ -225,7 +225,7 @@
|
|||
|
||||
case 'config':
|
||||
ponse.sendFile({
|
||||
name : JSONDIR + 'config.json',
|
||||
name : DIR_JSON + 'config.json',
|
||||
request : p.request,
|
||||
response: p.response,
|
||||
cache : false
|
||||
|
|
@ -377,7 +377,7 @@
|
|||
|
||||
json = Util.stringifyJSON(config) + '\n';
|
||||
|
||||
fs.writeFile(JSONDIR + 'config.json', json, function(error) {
|
||||
fs.writeFile(DIR_JSON + 'config.json', json, function(error) {
|
||||
data = formatMsg('config', name);
|
||||
callback(error, data);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue