@shisyamo4131/air-guard-v2-schemas 1.3.1-dev.14 → 1.3.1-dev.15
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 +1 -1
- package/src/OperationBilling.js +7 -5
package/package.json
CHANGED
package/src/OperationBilling.js
CHANGED
|
@@ -230,10 +230,12 @@ export default class OperationBilling extends OperationResult {
|
|
|
230
230
|
if (typeof value !== "boolean") {
|
|
231
231
|
throw new Error("Invalid value provided to toggleLock method");
|
|
232
232
|
}
|
|
233
|
-
const
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
233
|
+
const instance = new OperationBilling();
|
|
234
|
+
const doc = await instance.fetchDoc({ docId });
|
|
235
|
+
if (!doc) {
|
|
236
|
+
throw new Error(`OperationResult document with ID ${docId} not found`);
|
|
237
|
+
}
|
|
238
|
+
doc.isLocked = value;
|
|
239
|
+
await doc.update();
|
|
238
240
|
}
|
|
239
241
|
}
|