@shisyamo4131/air-guard-v2-schemas 2.1.0 → 2.1.1

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": "@shisyamo4131/air-guard-v2-schemas",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Schemas for AirGuard V2",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -466,12 +466,6 @@ export default class ArrangementNotification extends SiteOperationScheduleDetail
466
466
  arguments: { ...options, transaction },
467
467
  };
468
468
  try {
469
- // すべてのデバッグログを削除;
470
- console.log("[bulkDelete] this:", this);
471
- console.log("[bulkDelete] this.type:", this.type);
472
- console.log("[bulkDelete] this.getAdapter:", this.getAdapter);
473
- console.log("[bulkDelete] this.getAdapter():", this.getAdapter?.());
474
- console.log(this);
475
469
  // サーバー側での実行を禁止
476
470
  if (this.type === "SERVER") {
477
471
  throw new Error(
@@ -492,8 +486,11 @@ export default class ArrangementNotification extends SiteOperationScheduleDetail
492
486
  const performTransaction = async (txn) => {
493
487
  // Delete all notification documents if workerIds is empty.
494
488
  if (workerIds.length === 0) {
495
- const fn = ArrangementNotification.fetchDocsBySiteOperationScheduleId;
496
- const docs = await fn(siteOperationScheduleId);
489
+ // 関数を変数に代入せず、直接呼び出す
490
+ const docs =
491
+ await ArrangementNotification.fetchDocsBySiteOperationScheduleId(
492
+ siteOperationScheduleId
493
+ );
497
494
  if (docs.length === 0) return;
498
495
  await Promise.all(
499
496
  docs.map((doc) => doc.delete({ transaction: txn }))