Implement multiple ids deletion for use with 0.3 APIs.

This commit is contained in:
Edward Lee 2009-08-31 17:50:23 -07:00
Родитель d09d8a37e6
Коммит 60f942b3ea
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -492,6 +492,13 @@ SyncEngine.prototype = {
// Remove the key for future uses
delete this._delete[key];
// Specially handle ids deletion until we have collection?ids=,,,
if (key == "ids") {
for each (let id in val)
new Resource(this.engineURL + id).delete();
continue;
}
// Send a delete for the property
this._log.info("Sending delete for " + key + ": " + val);
let coll = new Collection(this.engineURL, this._recordObj);