mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 01:47:35 +00:00
minor changes
This commit is contained in:
parent
e5d98811cf
commit
812a11d104
1 changed files with 7 additions and 4 deletions
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
var main = global.cloudcmd.main,
|
||||
Util = main.util,
|
||||
CloudFunc = main.cloudfunc,
|
||||
|
||||
OK = 200,
|
||||
Header = main.generateHeaders({
|
||||
|
|
@ -83,11 +84,12 @@
|
|||
lCmd = pParams.command,
|
||||
lMethod = pParams.method;
|
||||
|
||||
if( Util.isContainStr(lCmd, 'fs') )
|
||||
if( Util.isContainStr(lCmd, CloudFunc.FS) )
|
||||
lResult = onFS({
|
||||
request : pParams.request,
|
||||
response: pParams.response,
|
||||
method : lMethod
|
||||
method : lMethod,
|
||||
name : lCmd
|
||||
});
|
||||
|
||||
if(lCmd[0] === '/'){
|
||||
|
|
@ -111,10 +113,11 @@
|
|||
|
||||
function onFS(pParams){
|
||||
var lResult,
|
||||
lMethod = pParams.method;
|
||||
lMethod = pParams.method,
|
||||
lName = Util.removeStr(pParams.name, CloudFunc.FS);
|
||||
|
||||
switch(lMethod){
|
||||
case 'GET':
|
||||
var lName = pParams.request.url;
|
||||
lResult = main.commander.getDirContent(lName, function(pError, pData){
|
||||
if(!pError){
|
||||
pParams.request.url += '.json';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue