From ad8345ff349d563e58dc26dbc3bc651509069597 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sun, 24 Feb 2013 09:48:10 -0500 Subject: [PATCH] totaly refactored and leave in commander.js just generation of json of directory listing --- ChangeLog | 3 +++ lib/server/rest.js | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec9de7ea..335b450a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -171,6 +171,9 @@ for now it's much simplier. * Added ability to disable browser cache from config.json. +* Totaly refactored and leave in commander.js just +generation of json of directory listing. + 2012.12.12, Version 0.1.8 diff --git a/lib/server/rest.js b/lib/server/rest.js index 943f64a2..0fcbfe8d 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -15,6 +15,7 @@ var main = global.cloudcmd.main, Util = main.util, + CloudFunc = main.cloudfunc, OK = 200, Header = main.generateHeaders({ name:'api.json' @@ -77,7 +78,7 @@ 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, @@ -107,7 +108,7 @@ function onFS(pParams){ var lResult, lMethod = pParams.method, - lName = Util.removeStr(pParams.name, 'fs'); + lName = Util.removeStr(pParams.name, CloudFunc.FS) || '/'; switch(lMethod){ case 'GET':