mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
minor changes
This commit is contained in:
parent
3411def3f0
commit
e5d98811cf
1 changed files with 9 additions and 9 deletions
|
|
@ -83,20 +83,19 @@
|
|||
lCmd = pParams.command,
|
||||
lMethod = pParams.method;
|
||||
|
||||
if( Util.isContainStr(lCmd, 'fs') )
|
||||
lResult = onFS({
|
||||
request : pParams.request,
|
||||
response: pParams.response,
|
||||
method : lMethod
|
||||
});
|
||||
|
||||
if(lCmd[0] === '/'){
|
||||
lCmd = Util.removeStr(lCmd, '/');
|
||||
pParams.command = lCmd;
|
||||
}
|
||||
|
||||
if( Util.isContainStr(lCmd, 'fs') ){
|
||||
pParams.request.url = '/' + lCmd + '?json';
|
||||
onFS({
|
||||
request : pParams.request,
|
||||
response: pParams.response,
|
||||
method : lMethod
|
||||
});
|
||||
}
|
||||
else
|
||||
if(!lResult)
|
||||
switch(lMethod){
|
||||
case 'GET':
|
||||
lResult = onGET(pParams);
|
||||
|
|
@ -118,6 +117,7 @@
|
|||
var lName = pParams.request.url;
|
||||
lResult = main.commander.getDirContent(lName, function(pError, pData){
|
||||
if(!pError){
|
||||
pParams.request.url += '.json';
|
||||
pParams.name = lName;
|
||||
pParams.data = Util.stringifyJSON(pData);
|
||||
main.sendResponse(pParams);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue