feature(cloudcmd, rest) add NOT_LOG

This commit is contained in:
coderaiser 2014-03-05 06:44:28 -05:00
parent 1c1c933a21
commit 54e68952d2
2 changed files with 6 additions and 4 deletions

View file

@ -224,6 +224,7 @@
getContent(name, function(error, data, isFile) {
var json,
NOT_LOG = true,
query = main.getQuery(request),
isJSON = Util.isContainStr(query, 'json');
@ -235,7 +236,7 @@
} else if (isJSON) {
p.name +='.json';
json = Util.stringifyJSON(data);
main.sendResponse(p, json, true);
main.sendResponse(p, json, NOT_LOG);
} else
readIndex(data, function(error, data) {
p.name = INDEX_PATH;
@ -243,7 +244,7 @@
if (error)
main.sendError(error);
else
main.sendResponse(p, data, true);
main.sendResponse(p, data, NOT_LOG);
});
});
}

View file

@ -132,7 +132,8 @@
switch (p.request.method) {
case 'GET':
onFSGet(query, p.name, function(error, data, isFile) {
var str;
var str,
NOT_LOG = true;
if (error)
sendError(params, error);
@ -141,7 +142,7 @@
else {
p.name += '.json';
str = Util.stringifyJSON(data);
sendResponse(p, str, true);
sendResponse(p, str, NOT_LOG);
}
});