mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(rest) onPut: rm Util.call
This commit is contained in:
parent
3957aa6045
commit
bd5f0d1bc6
1 changed files with 4 additions and 3 deletions
|
|
@ -162,7 +162,7 @@
|
|||
fs.readFile(p.name, 'utf8', read.bind(null, p.name));
|
||||
|
||||
function read(name, error, data) {
|
||||
checkSendError(error, params, function() {
|
||||
checkSendError(error, p.params, function() {
|
||||
var diffResult;
|
||||
|
||||
ret = Util.tryCatchLog(function() {
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
fs.writeFile(name, diffResult, write.bind(null, name));
|
||||
else {
|
||||
name = path.basename(name);
|
||||
sendMsg(params, 'patch', name, 'fail');
|
||||
sendMsg(p.params, 'patch', name, 'fail');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -181,7 +181,6 @@
|
|||
function write(name, error) {
|
||||
checkSendError(error, params, function() {
|
||||
name = path.basename(name);
|
||||
|
||||
sendMsg(params, 'patch', name);
|
||||
});
|
||||
}
|
||||
|
|
@ -355,6 +354,8 @@
|
|||
lCmd = p.command,
|
||||
lFiles = Util.parseJSON(p.body);
|
||||
|
||||
console.log(lFiles);
|
||||
|
||||
switch(lCmd) {
|
||||
case 'auth':
|
||||
main.auth(p.body, function(pTocken) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue