From 34d6c498701e3072b86763ef81903d7f66919955 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 22 Jun 2007 17:38:32 +0000 Subject: [PATCH] update example git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5439 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- scripts/api.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/api.js b/scripts/api.js index 3d8bf559b2..5bcae78a77 100644 --- a/scripts/api.js +++ b/scripts/api.js @@ -53,10 +53,12 @@ request.write(""); request.write("

"); if ((command = request.getHeader("command"))) { - cmd_list = command.split(" ", 2); + cmd_list = command.split(" "); + cmd = cmd_list.shift(); + args = cmd_list.join(" "); - if ((reply = apiExecute(cmd_list[0], cmd_list[1]))) { - request.write("Command Result
" + reply + "\n
"); + if ((reply = apiExecute(cmd, args))) { + request.write("
Command Result
" + reply + "\n
"); } }