mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
minor changes
This commit is contained in:
parent
2382fcbfaf
commit
1e7ea49a75
2 changed files with 15 additions and 12 deletions
19
cloudcmd.js
19
cloudcmd.js
|
|
@ -17,11 +17,14 @@
|
|||
Server = main.require(LIBDIR + 'server'),
|
||||
Minify = Server.Minify,
|
||||
srv = Server.CloudServer,
|
||||
Config = main.config;
|
||||
Config = main.config,
|
||||
|
||||
REQUEST = 'request',
|
||||
RESPONSE = 'response';
|
||||
|
||||
/* reinit main dir os if we on
|
||||
* Win32 should be backslashes */
|
||||
DIR = main.DIR;
|
||||
DIR = main.DIR,
|
||||
|
||||
readConfig();
|
||||
Server.start(Config, {
|
||||
|
|
@ -199,14 +202,12 @@
|
|||
}else if( Util.isContainStr(lName, [CloudFunc.Fs, CloudFunc.NoJS] ) ||
|
||||
Util.strCmp(lName, '/') ||
|
||||
Util.strCmp(lName, 'json') ) {
|
||||
main.commander.sendContent({
|
||||
request : pParams.request,
|
||||
response : pParams.response,
|
||||
indexProcessing : indexProcessing
|
||||
lRet = main.commander.sendContent({
|
||||
request : pParams[REQUEST],
|
||||
response : pParams[RESPONSE],
|
||||
processing : indexProcessing
|
||||
});
|
||||
|
||||
lRet = true;
|
||||
}
|
||||
}
|
||||
|
||||
return lRet;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
NO_JS = CloudFunc.NoJS,
|
||||
FS = CloudFunc.Fs,
|
||||
INDEX = HTMLDIR + 'index.html',
|
||||
REQUEST = 'request',
|
||||
RESPONSE = 'response',
|
||||
|
||||
IndexProcessingFunc = null;
|
||||
|
||||
|
|
@ -33,7 +35,7 @@
|
|||
exports.sendContent = function(pParams){
|
||||
var lRet = Util.checkObj(pParams,
|
||||
['processing'],
|
||||
['request', 'response']);
|
||||
[REQUEST, RESPONSE]);
|
||||
|
||||
if(lRet){
|
||||
var lReq = pParams.request,
|
||||
|
|
@ -257,7 +259,7 @@
|
|||
|
||||
if(lRet)
|
||||
lRet = Util.checkObj(pParams.params,
|
||||
['callback'], ['request', 'response', 'name', 'list']);
|
||||
['callback'], [REQUEST, RESPONSE, 'name', 'list']);
|
||||
|
||||
if(lRet){
|
||||
var p = pParams,
|
||||
|
|
@ -399,7 +401,7 @@
|
|||
*/
|
||||
function sendResponse(pParams){
|
||||
var lRet = Util.checkObjTrue(pParams,
|
||||
['name', 'data', 'request', 'response']);
|
||||
['name', 'data', REQUEST, RESPONSE]);
|
||||
|
||||
if(lRet){
|
||||
var p = pParams;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue