@onehat/data 1.15.5 → 1.15.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.15.5",
3
+ "version": "1.15.7",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -207,7 +207,8 @@ class AsyncStorageRepository extends OfflineRepository {
207
207
  }
208
208
 
209
209
  clearAll = async () => {
210
- return await this.load([]);
210
+ await this.load([]);
211
+ await this.clearLastSync();
211
212
  }
212
213
 
213
214
  getAllKeys = async () => {
@@ -407,6 +407,15 @@ class OfflineRepository extends MemoryRepository {
407
407
  await this._storageSetValue(LAST_SYNC, date);
408
408
  }
409
409
 
410
+
411
+ /**
412
+ * Clears the date when this Repository was last synced with remote.
413
+ * Used when this is the "local" side of a LocalFromRemoteRepository
414
+ */
415
+ clearLastSync = async () => {
416
+ await this._storageDeleteValue(LAST_SYNC);
417
+ }
418
+
410
419
  };
411
420
 
412
421
  OfflineRepository.className = 'Offline';
@@ -256,7 +256,7 @@ class OneBuildRepository extends AjaxRepository {
256
256
  }
257
257
 
258
258
  const data = {
259
- url: 'reorder',
259
+ url: this.name + '/reorder',
260
260
  data: qs.stringify({
261
261
  ids: dragRecord.id,
262
262
  dropPosition,