mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
fix(rest) onGET: json.parse
This commit is contained in:
parent
8414dcec9c
commit
960430c848
1 changed files with 4 additions and 7 deletions
|
|
@ -121,8 +121,7 @@
|
|||
* @param pParams {method, body, requrest, response}
|
||||
*/
|
||||
function onGET(params, callback) {
|
||||
var cmd, json,
|
||||
p = params;
|
||||
var cmd, p = params;
|
||||
|
||||
if (p.name[0] === '/')
|
||||
cmd = p.name.replace('/', '');
|
||||
|
|
@ -141,11 +140,9 @@
|
|||
break;
|
||||
|
||||
default:
|
||||
json = {
|
||||
message: 'Error: command not found!'
|
||||
};
|
||||
|
||||
callback(json);
|
||||
callback({
|
||||
message: 'Not Found'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue