diff --git a/lib/server/rest.js b/lib/server/rest.js index 31b6786c..32c3184d 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -51,7 +51,12 @@ response : response }; - check(arguments, ['request', 'response', 'next']); + check + .type('next', next, 'function') + .check({ + request: request, + response: response + }). apiURL = CloudFunc.apiURL; name = ponse.getPathName(request); @@ -170,7 +175,12 @@ function onPUT(name, body, callback) { var cmd, files, data, from, to, msg; - check(arguments, ['name', 'body', 'callback']); + check + .type('callback', callback, 'function') + .check({ + name: name, + body: body + }); if (name[0] === '/') cmd = name.replace('/', ''); @@ -326,7 +336,12 @@ }); }; - check(arguments, ['files', 'processFunc', 'callback']); + check + .type('callback', callback, 'function') + .type('processFunc', processFunc, 'function') + .check({ + files: files + }); copy(); } diff --git a/package.json b/package.json index 8d514029..97c74a75 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "subdomain": "cloudcmd", "dependencies": { - "checkup": "~1.0.3", + "checkup": "~1.1.0", "console-io": "~2.2.0", "copymitter": "~1.8.0", "dword": "~1.5.0",