@azrico/webobject 1.4.109 → 1.4.110
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.
|
@@ -61,7 +61,7 @@ export declare class WebObject extends SimpleObject {
|
|
|
61
61
|
[key: string]: any;
|
|
62
62
|
}): Promise<boolean>;
|
|
63
63
|
Save(): Promise<any>;
|
|
64
|
-
Delete(): Promise<
|
|
64
|
+
Delete(): Promise<any>;
|
|
65
65
|
Archive(): Promise<boolean>;
|
|
66
66
|
UnArchive(): Promise<boolean>;
|
|
67
67
|
canSave(deltaObj?: any): true | string;
|
|
@@ -219,19 +219,26 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
219
219
|
key: "Delete",
|
|
220
220
|
value: function Delete() {
|
|
221
221
|
return (_Delete = _Delete || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
222
|
+
var resultObject;
|
|
222
223
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
223
224
|
while (1) switch (_context3.prev = _context3.next) {
|
|
224
225
|
case 0:
|
|
225
|
-
if (!
|
|
226
|
+
if (!this.isNew) {
|
|
226
227
|
_context3.next = 2;
|
|
227
228
|
break;
|
|
228
229
|
}
|
|
229
|
-
|
|
230
|
+
return _context3.abrupt("return");
|
|
230
231
|
case 2:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
_context3.next = 4;
|
|
233
|
+
return _global.gfunc.run_action("delete", "".concat(this.__web_path, "/").concat(this.getID()));
|
|
234
|
+
case 4:
|
|
235
|
+
resultObject = _context3.sent;
|
|
236
|
+
this.setSaveResult(resultObject, "auto", true);
|
|
237
|
+
_context3.next = 8;
|
|
238
|
+
return this.onDelete();
|
|
239
|
+
case 8:
|
|
240
|
+
return _context3.abrupt("return", resultObject);
|
|
241
|
+
case 9:
|
|
235
242
|
case "end":
|
|
236
243
|
return _context3.stop();
|
|
237
244
|
}
|