Fix Resource.* call sites used for wiping the server and initial sync (+ key gen upload)

This commit is contained in:
Edward Lee 2009-06-04 10:17:27 -07:00
parent 5220bc6208
commit 3e935d30d1
3 changed files with 5 additions and 5 deletions

View File

@ -187,7 +187,7 @@ PubKeyManager.prototype = {
let self = yield;
for each (let key in keys) {
let res = new Resource(key.uri);
yield res.put(self.cb, key.serialize());
res.put(key.serialize());
}
};
fn.async(this, onComplete, keys);

View File

@ -309,7 +309,7 @@ SyncEngine.prototype = {
meta.generateIV();
yield meta.addUnwrappedKey(self.cb, pubkey, symkey);
let res = new Resource(meta.uri);
yield res.put(self.cb, meta.serialize());
res.put(meta.serialize());
}
// first sync special case: upload all items

View File

@ -989,7 +989,7 @@ WeaveSvc.prototype = {
meta.payload.storageVersion = WEAVE_VERSION;
meta.payload.syncID = Clients.syncID;
let res = new Resource(meta.uri);
yield res.put(self.cb, meta.serialize());
res.put(meta.serialize());
},
/**
@ -1007,7 +1007,7 @@ WeaveSvc.prototype = {
// Grab all the collections for the user
let userURL = this.clusterURL + this.username + "/";
let res = new Resource(userURL);
yield res.get(self.cb);
res.get();
// Get the array of collections and delete each one
let allCollections = JSON.parse(res.data);
@ -1017,7 +1017,7 @@ WeaveSvc.prototype = {
if (engines && engines.indexOf(name) == -1)
continue;
yield new Resource(userURL + name).delete(self.cb);
new Resource(userURL + name).delete();
}
catch(ex) {
this._log.debug("Exception on wipe of '" + name + "': " + Utils.exceptionStr(ex));