feature(rest) JSONDIR -> DIR_JSON

This commit is contained in:
coderaiser 2014-08-26 09:46:46 -04:00
parent d7e3e55445
commit 283541795f

View file

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