@infrab4a/connect 1.0.0-beta.36 → 1.0.0-beta.37
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.
|
@@ -1811,24 +1811,29 @@
|
|
|
1811
1811
|
return __generator(this, function (_a) {
|
|
1812
1812
|
switch (_a.label) {
|
|
1813
1813
|
case 0:
|
|
1814
|
-
|
|
1814
|
+
delete product.createdAt;
|
|
1815
|
+
delete product.updatedAt;
|
|
1816
|
+
delete product.kitProducts;
|
|
1817
|
+
_a.label = 1;
|
|
1818
|
+
case 1:
|
|
1819
|
+
_a.trys.push([1, 4, , 6]);
|
|
1815
1820
|
if (!product.firestoreId)
|
|
1816
1821
|
throw new Error('Is not a product from firestore');
|
|
1817
1822
|
return [4 /*yield*/, this.get(product.firestoreId)];
|
|
1818
|
-
case 1:
|
|
1819
|
-
_a.sent();
|
|
1820
|
-
return [4 /*yield*/, this.adapter.save("products/_doc/" + product.firestoreId, product.toPlain())];
|
|
1821
1823
|
case 2:
|
|
1822
1824
|
_a.sent();
|
|
1823
|
-
return [
|
|
1825
|
+
return [4 /*yield*/, this.adapter.save("products/_doc/" + product.firestoreId, product.toPlain())];
|
|
1824
1826
|
case 3:
|
|
1827
|
+
_a.sent();
|
|
1828
|
+
return [3 /*break*/, 6];
|
|
1829
|
+
case 4:
|
|
1825
1830
|
error_1 = _a.sent();
|
|
1826
1831
|
console.info(error_1.message);
|
|
1827
1832
|
return [4 /*yield*/, this.adapter.save("products/_doc/" + product.id, product.toPlain())];
|
|
1828
|
-
case
|
|
1833
|
+
case 5:
|
|
1829
1834
|
_a.sent();
|
|
1830
|
-
return [3 /*break*/,
|
|
1831
|
-
case
|
|
1835
|
+
return [3 /*break*/, 6];
|
|
1836
|
+
case 6: return [2 /*return*/];
|
|
1832
1837
|
}
|
|
1833
1838
|
});
|
|
1834
1839
|
});
|