@chevre/domain 20.1.0-alpha.44 → 20.1.0-alpha.46
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/example/src/chevre/deleteReservationTicketUnderNames.ts +20 -0
- package/lib/chevre/repo/reservation.d.ts +1 -0
- package/lib/chevre/repo/reservation.js +12 -0
- package/lib/chevre/service/assetTransaction/cancelReservation/factory.js +54 -37
- package/lib/chevre/service/reserve/cancelReservation.js +108 -52
- package/lib/chevre/service/reserve/factory.d.ts +1 -1
- package/lib/chevre/service/reserve/factory.js +6 -6
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +1 -1
- package/package.json +1 -1
- package/example/src/chevre/deleteEvents.ts +0 -50
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../lib/index';
|
|
5
|
+
|
|
6
|
+
// const project = { id: String(process.env.PROJECT_ID) };
|
|
7
|
+
|
|
8
|
+
async function main() {
|
|
9
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
10
|
+
|
|
11
|
+
const reservationRepo = new chevre.repository.Reservation(mongoose.connection);
|
|
12
|
+
|
|
13
|
+
const result = await reservationRepo.deleteReservedTicketUnderName();
|
|
14
|
+
|
|
15
|
+
console.log('deleted', result);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
main()
|
|
19
|
+
.then()
|
|
20
|
+
.catch(console.error);
|
|
@@ -1087,5 +1087,17 @@ class MongoRepository {
|
|
|
1087
1087
|
.then((docs) => docs.map((doc) => doc._id.toString()));
|
|
1088
1088
|
});
|
|
1089
1089
|
}
|
|
1090
|
+
deleteReservedTicketUnderName() {
|
|
1091
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1092
|
+
const conditions = {
|
|
1093
|
+
'reservedTicket.underName': { $exists: true }
|
|
1094
|
+
};
|
|
1095
|
+
const update = {
|
|
1096
|
+
$unset: { 'reservedTicket.underName': 1 }
|
|
1097
|
+
};
|
|
1098
|
+
return this.reservationModel.updateMany(conditions, update)
|
|
1099
|
+
.exec();
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1090
1102
|
}
|
|
1091
1103
|
exports.MongoRepository = MongoRepository;
|
|
@@ -24,49 +24,66 @@ exports.createStartParams = createStartParams;
|
|
|
24
24
|
function createPotentialActions(params) {
|
|
25
25
|
var _a, _b;
|
|
26
26
|
const transaction = params.transaction;
|
|
27
|
-
let
|
|
27
|
+
let cancelReservationActionAttributes = [];
|
|
28
|
+
// 予約番号指定であれば予約番号単位でアクション生成(2022-12-27~)
|
|
28
29
|
// 予約番号指定の取消取引であれば、予約取引から取消対象予約リストを作成する
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
if (reservationForByReserveTransaction !== undefined &&
|
|
32
|
-
targetReservations = subReservationByReserveTransaction.map((r) => {
|
|
33
|
-
return Object.assign(Object.assign({}, r), { reservationFor: reservationForByReserveTransaction });
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
else if (Array.isArray(transaction.object.reservations)) {
|
|
37
|
-
targetReservations = transaction.object.reservations;
|
|
38
|
-
}
|
|
39
|
-
// 予約取消アクション属性作成
|
|
40
|
-
const cancelReservationActionAttributes = targetReservations.map((reservation) => {
|
|
41
|
-
var _a;
|
|
42
|
-
// 最適化(2022-06-06~)
|
|
30
|
+
const reservationNumber = (_a = transaction.object.transaction) === null || _a === void 0 ? void 0 : _a.transactionNumber;
|
|
31
|
+
const reservationForByReserveTransaction = (_b = transaction.object.transaction) === null || _b === void 0 ? void 0 : _b.object.reservationFor;
|
|
32
|
+
if (reservationForByReserveTransaction !== undefined && typeof reservationNumber === 'string') {
|
|
43
33
|
const cancelObject = {
|
|
44
|
-
typeOf: reservation.typeOf,
|
|
45
|
-
id: reservation.id,
|
|
46
|
-
issuedThrough: {
|
|
47
|
-
typeOf: (_a = reservation.issuedThrough) === null || _a === void 0 ? void 0 : _a.typeOf
|
|
48
|
-
},
|
|
49
34
|
reservationFor: {
|
|
50
|
-
typeOf:
|
|
51
|
-
id:
|
|
35
|
+
typeOf: reservationForByReserveTransaction.typeOf,
|
|
36
|
+
id: reservationForByReserveTransaction.id
|
|
52
37
|
},
|
|
53
|
-
reservationNumber
|
|
38
|
+
reservationNumber,
|
|
54
39
|
// ReservationConfirmed->ReservationCancelledのみ処理されるように保証する
|
|
55
|
-
reservationStatus: factory.reservationStatusType.ReservationConfirmed
|
|
40
|
+
reservationStatus: factory.reservationStatusType.ReservationConfirmed,
|
|
41
|
+
typeOf: factory.reservationType.ReservationPackage
|
|
56
42
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
43
|
+
cancelReservationActionAttributes = [{
|
|
44
|
+
project: transaction.project,
|
|
45
|
+
typeOf: factory.actionType.CancelAction,
|
|
46
|
+
object: cancelObject,
|
|
47
|
+
agent: transaction.project,
|
|
48
|
+
potentialActions: {},
|
|
49
|
+
purpose: {
|
|
50
|
+
typeOf: transaction.typeOf,
|
|
51
|
+
id: transaction.id
|
|
52
|
+
}
|
|
53
|
+
}];
|
|
54
|
+
}
|
|
55
|
+
else if (Array.isArray(transaction.object.reservations)) {
|
|
56
|
+
// 予約取消アクション属性作成
|
|
57
|
+
cancelReservationActionAttributes = transaction.object.reservations.map((reservation) => {
|
|
58
|
+
var _a;
|
|
59
|
+
// 最適化(2022-06-06~)
|
|
60
|
+
const cancelObject = {
|
|
61
|
+
typeOf: reservation.typeOf,
|
|
62
|
+
id: reservation.id,
|
|
63
|
+
issuedThrough: {
|
|
64
|
+
typeOf: (_a = reservation.issuedThrough) === null || _a === void 0 ? void 0 : _a.typeOf
|
|
65
|
+
},
|
|
66
|
+
reservationFor: {
|
|
67
|
+
typeOf: reservation.reservationFor.typeOf,
|
|
68
|
+
id: reservation.reservationFor.id
|
|
69
|
+
},
|
|
70
|
+
reservationNumber: reservation.reservationNumber,
|
|
71
|
+
// ReservationConfirmed->ReservationCancelledのみ処理されるように保証する
|
|
72
|
+
reservationStatus: factory.reservationStatusType.ReservationConfirmed
|
|
73
|
+
};
|
|
74
|
+
return {
|
|
75
|
+
project: transaction.project,
|
|
76
|
+
typeOf: factory.actionType.CancelAction,
|
|
77
|
+
object: cancelObject,
|
|
78
|
+
agent: transaction.project,
|
|
79
|
+
potentialActions: {},
|
|
80
|
+
purpose: {
|
|
81
|
+
typeOf: transaction.typeOf,
|
|
82
|
+
id: transaction.id
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
}
|
|
70
87
|
return {
|
|
71
88
|
cancelReservation: cancelReservationActionAttributes
|
|
72
89
|
};
|
|
@@ -144,66 +144,122 @@ exports.cancelPendingReservation = cancelPendingReservation;
|
|
|
144
144
|
* 予約をキャンセルする
|
|
145
145
|
*/
|
|
146
146
|
function cancelReservation(actionAttributesList) {
|
|
147
|
+
// tslint:disable-next-line:max-func-body-length
|
|
147
148
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
148
149
|
const now = new Date();
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
150
|
+
let canceledReservations = [];
|
|
151
|
+
if (actionAttributesList.length > 0) {
|
|
152
|
+
// tslint:disable-next-line:max-func-body-length
|
|
153
|
+
yield Promise.all(actionAttributesList.map((actionAttributes) => __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
const action = yield repos.action.start(actionAttributes);
|
|
155
|
+
let cancelResult;
|
|
156
|
+
try {
|
|
157
|
+
if (actionAttributes.object.typeOf === factory.reservationType.ReservationPackage) {
|
|
158
|
+
// 予約取引を検索
|
|
159
|
+
const reserveTransactions = yield repos.assetTransaction.search({
|
|
160
|
+
limit: 1,
|
|
161
|
+
page: 1,
|
|
162
|
+
typeOf: factory.assetTransactionType.Reserve,
|
|
163
|
+
ids: [actionAttributes.object.reservationNumber]
|
|
164
|
+
});
|
|
165
|
+
const reserveTransaction = reserveTransactions.shift();
|
|
166
|
+
if (reserveTransaction === undefined) {
|
|
167
|
+
throw new factory.errors.NotFound('ReserveTransaction');
|
|
168
|
+
}
|
|
169
|
+
const reservationFor = reserveTransaction.object.reservationFor;
|
|
170
|
+
if (reservationFor === undefined) {
|
|
171
|
+
throw new factory.errors.NotFound('transaction.object.reservationFor');
|
|
172
|
+
}
|
|
173
|
+
const subReservation = reserveTransaction.object.subReservation;
|
|
174
|
+
if (Array.isArray(subReservation) && subReservation.length > 0) {
|
|
175
|
+
yield Promise.all(subReservation.map((cancelingSubReservation) => __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
const cancelingReservation = Object.assign(Object.assign({}, cancelingSubReservation), { reservationFor });
|
|
177
|
+
yield processUnlockSeat({
|
|
178
|
+
reservation: cancelingReservation,
|
|
179
|
+
expectedHolder: reserveTransaction.id
|
|
180
|
+
})(repos);
|
|
181
|
+
yield processUnlockOfferRateLimit({ reservation: cancelingReservation, reservationFor })(repos);
|
|
182
|
+
})));
|
|
183
|
+
}
|
|
184
|
+
// 予約番号単位でキャンセル状態に変更する
|
|
185
|
+
cancelResult = yield repos.reservation.cancelByReservationNumber({
|
|
186
|
+
reservationNumber: actionAttributes.object.reservationNumber,
|
|
187
|
+
previousReservationStatus: actionAttributes.object.reservationStatus,
|
|
188
|
+
modifiedTime: now
|
|
189
|
+
});
|
|
172
190
|
}
|
|
173
|
-
|
|
174
|
-
yield
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
191
|
+
else {
|
|
192
|
+
const reservation = yield repos.reservation.findById({
|
|
193
|
+
id: actionAttributes.object.id
|
|
194
|
+
});
|
|
195
|
+
// 予約取引を検索
|
|
196
|
+
const reserveTransactions = yield repos.assetTransaction.search({
|
|
197
|
+
limit: 1,
|
|
198
|
+
page: 1,
|
|
199
|
+
typeOf: factory.assetTransactionType.Reserve,
|
|
200
|
+
object: { reservations: { id: { $in: [reservation.id] } } }
|
|
201
|
+
});
|
|
202
|
+
const reserveTransaction = reserveTransactions.shift();
|
|
203
|
+
let exectedHolder;
|
|
204
|
+
if (reserveTransaction !== undefined) {
|
|
205
|
+
exectedHolder = reserveTransaction.id;
|
|
206
|
+
}
|
|
207
|
+
if (typeof exectedHolder === 'string') {
|
|
208
|
+
yield processUnlockSeat({
|
|
209
|
+
reservation: reservation,
|
|
210
|
+
expectedHolder: exectedHolder
|
|
211
|
+
})(repos);
|
|
212
|
+
}
|
|
213
|
+
yield processUnlockOfferRateLimit({ reservation, reservationFor: reservation.reservationFor })(repos);
|
|
214
|
+
// 予約をキャンセル状態に変更する
|
|
215
|
+
const canceledReservation = yield repos.reservation.cancel({
|
|
216
|
+
id: reservation.id,
|
|
217
|
+
previousReservationStatus: actionAttributes.object.reservationStatus,
|
|
218
|
+
modifiedTime: now
|
|
219
|
+
});
|
|
220
|
+
canceledReservations.push(canceledReservation);
|
|
178
221
|
}
|
|
179
|
-
yield processUnlockOfferRateLimit({ reservation, reservationFor: reservation.reservationFor })(repos);
|
|
180
|
-
// 予約をキャンセル状態に変更する
|
|
181
|
-
canceledReservation = yield repos.reservation.cancel({
|
|
182
|
-
id: reservation.id,
|
|
183
|
-
previousReservationStatus: actionAttributes.object.reservationStatus,
|
|
184
|
-
modifiedTime: now
|
|
185
|
-
});
|
|
186
|
-
canceledReservations.push(canceledReservation);
|
|
187
222
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
223
|
+
catch (error) {
|
|
224
|
+
// actionにエラー結果を追加
|
|
225
|
+
try {
|
|
226
|
+
const actionError = Object.assign(Object.assign({}, error), { message: error.message, name: error.name });
|
|
227
|
+
yield repos.action.giveUp({ typeOf: action.typeOf, id: action.id, error: actionError });
|
|
228
|
+
}
|
|
229
|
+
catch (__) {
|
|
230
|
+
// 失敗したら仕方ない
|
|
231
|
+
}
|
|
232
|
+
throw error;
|
|
194
233
|
}
|
|
195
|
-
|
|
196
|
-
|
|
234
|
+
const actionResult = Object.assign({}, (cancelResult !== undefined) ? {
|
|
235
|
+
cancelResult: {
|
|
236
|
+
n: cancelResult.n,
|
|
237
|
+
nModified: cancelResult.nModified,
|
|
238
|
+
ok: cancelResult.ok
|
|
239
|
+
}
|
|
240
|
+
} : undefined
|
|
241
|
+
// canceledReservationId: canceledReservation?.id
|
|
242
|
+
);
|
|
243
|
+
yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: actionResult });
|
|
244
|
+
yield (0, onReservationCanceled_1.onReservationCanceledByAction)(actionAttributes)({ task: repos.task });
|
|
245
|
+
})));
|
|
246
|
+
if (actionAttributesList[0].object.typeOf === factory.reservationType.ReservationPackage) {
|
|
247
|
+
const reservationNumber = actionAttributesList[0].object.reservationNumber;
|
|
248
|
+
if (typeof reservationNumber === 'string' && reservationNumber.length > 0) {
|
|
249
|
+
// 最新のconfirmedReservationsを検索
|
|
250
|
+
canceledReservations = yield repos.reservation.search({
|
|
251
|
+
reservationNumber: { $eq: reservationNumber },
|
|
252
|
+
typeOf: factory.reservationType.EventReservation
|
|
253
|
+
});
|
|
254
|
+
canceledReservations = canceledReservations.map((r) => {
|
|
255
|
+
// _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
|
|
256
|
+
delete r._id;
|
|
257
|
+
return r;
|
|
258
|
+
});
|
|
197
259
|
}
|
|
198
|
-
throw error;
|
|
199
260
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
};
|
|
203
|
-
yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: actionResult });
|
|
204
|
-
yield (0, onReservationCanceled_1.onReservationCanceledByAction)(actionAttributes)({ task: repos.task });
|
|
205
|
-
})));
|
|
206
|
-
yield (0, onReservationCanceled_1.onReservationCanceled)(canceledReservations, true)({ task: repos.task });
|
|
261
|
+
yield (0, onReservationCanceled_1.onReservationCanceled)(canceledReservations, true)({ task: repos.task });
|
|
262
|
+
}
|
|
207
263
|
});
|
|
208
264
|
}
|
|
209
265
|
exports.cancelReservation = cancelReservation;
|
|
@@ -5,7 +5,7 @@ export interface IProject {
|
|
|
5
5
|
id: string;
|
|
6
6
|
typeOf: factory.organizationType.Project;
|
|
7
7
|
}
|
|
8
|
-
export declare type ISubReservation = Omit<IEventReservation, 'project' | 'reservationFor' | 'reservationNumber' | 'reservationStatus' | 'underName'>;
|
|
8
|
+
export declare type ISubReservation = Omit<IEventReservation, 'broker' | 'project' | 'reservationFor' | 'reservationNumber' | 'reservationStatus' | 'underName'>;
|
|
9
9
|
/**
|
|
10
10
|
* 確定予約通知
|
|
11
11
|
*/
|
|
@@ -4,16 +4,16 @@ exports.NUM_TRY_INFORM_RESERVATION = exports.maskUnderName = void 0;
|
|
|
4
4
|
const reservedAgentIdentifireNames_1 = require("../../factory/reservedAgentIdentifireNames");
|
|
5
5
|
const MASKED_PROFILE = '****';
|
|
6
6
|
function maskUnderName(reservation) {
|
|
7
|
-
var _a;
|
|
8
|
-
const underName = (typeof ((_a = reservation.underName) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string')
|
|
9
|
-
? Object.assign(Object.assign({}, reservation.underName), { email: MASKED_PROFILE, telephone: MASKED_PROFILE, name: MASKED_PROFILE, familyName: MASKED_PROFILE, givenName: MASKED_PROFILE }) : undefined;
|
|
7
|
+
var _a, _b, _c;
|
|
10
8
|
// 予約後を隠蔽(2022-12-24~)
|
|
11
|
-
const
|
|
12
|
-
? reservation.identifier.filter((p) => {
|
|
9
|
+
const underNameIdentifiers = (Array.isArray((_a = reservation.underName) === null || _a === void 0 ? void 0 : _a.identifier))
|
|
10
|
+
? (_b = reservation.underName) === null || _b === void 0 ? void 0 : _b.identifier.filter((p) => {
|
|
13
11
|
return !reservedAgentIdentifireNames_1.RESERVED_AGENT_IDENTIFIER_NAMES.includes(p.name);
|
|
14
12
|
})
|
|
15
13
|
: undefined;
|
|
16
|
-
|
|
14
|
+
const underName = (typeof ((_c = reservation.underName) === null || _c === void 0 ? void 0 : _c.typeOf) === 'string')
|
|
15
|
+
? Object.assign(Object.assign(Object.assign({}, reservation.underName), { email: MASKED_PROFILE, telephone: MASKED_PROFILE, name: MASKED_PROFILE, familyName: MASKED_PROFILE, givenName: MASKED_PROFILE }), (Array.isArray(underNameIdentifiers)) ? { identifier: underNameIdentifiers } : undefined) : undefined;
|
|
16
|
+
return Object.assign(Object.assign({}, reservation), (underName !== undefined) ? { underName } : undefined);
|
|
17
17
|
}
|
|
18
18
|
exports.maskUnderName = maskUnderName;
|
|
19
19
|
exports.NUM_TRY_INFORM_RESERVATION = 10;
|
|
@@ -110,7 +110,7 @@ function onReservationConfirmed(confirmedReservations) {
|
|
|
110
110
|
// ReservationPackage通知に変更(2022-12-24~)
|
|
111
111
|
// const informObject: IInformObject = confirmedReservations.map(maskUnderName);
|
|
112
112
|
const informObject = [Object.assign({ project: confirmedReservations[0].project, reservationFor: confirmedReservations[0].reservationFor, reservationNumber: confirmedReservations[0].reservationNumber, reservationStatus: confirmedReservations[0].reservationStatus, subReservation: confirmedReservations.map((r) => {
|
|
113
|
-
const { project, reservationFor, reservationNumber, reservationStatus, underName } = r, subReservation = __rest(r, ["project", "reservationFor", "reservationNumber", "reservationStatus", "underName"]);
|
|
113
|
+
const { broker, project, reservationFor, reservationNumber, reservationStatus, underName } = r, subReservation = __rest(r, ["broker", "project", "reservationFor", "reservationNumber", "reservationStatus", "underName"]);
|
|
114
114
|
return subReservation;
|
|
115
115
|
}), typeOf: factory.reservationType.ReservationPackage }, (typeof ((_b = confirmedReservations[0].underName) === null || _b === void 0 ? void 0 : _b.typeOf) === 'string')
|
|
116
116
|
? { underName: (0, factory_1.maskUnderName)(confirmedReservations[0]).underName }
|
package/package.json
CHANGED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console
|
|
2
|
-
import * as moment from 'moment';
|
|
3
|
-
import * as mongoose from 'mongoose';
|
|
4
|
-
|
|
5
|
-
import { chevre } from '../../../lib/index';
|
|
6
|
-
|
|
7
|
-
const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
-
|
|
9
|
-
async function main() {
|
|
10
|
-
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
11
|
-
|
|
12
|
-
const eventRepo = new chevre.repository.Event(mongoose.connection);
|
|
13
|
-
|
|
14
|
-
const cursor = eventRepo.getCursor(
|
|
15
|
-
{
|
|
16
|
-
'project.id': { $eq: project.id },
|
|
17
|
-
typeOf: { $eq: chevre.factory.eventType.ScreeningEvent },
|
|
18
|
-
// 'superEvent.location.branchCode': { $eq: '118', $exists: true },
|
|
19
|
-
endDate: {
|
|
20
|
-
$exists: true,
|
|
21
|
-
$lt: moment()
|
|
22
|
-
.add(-1, 'month')
|
|
23
|
-
.toDate()
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
// _id: 1,
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
console.log('events found');
|
|
31
|
-
|
|
32
|
-
let i = 0;
|
|
33
|
-
let updateCount = 0;
|
|
34
|
-
await cursor.eachAsync(async (doc) => {
|
|
35
|
-
i += 1;
|
|
36
|
-
const event: chevre.factory.event.screeningEvent.IEvent = doc.toObject();
|
|
37
|
-
|
|
38
|
-
console.log('deleting event...', event.project.id, event.id, event.startDate, i);
|
|
39
|
-
await eventRepo.deleteById({ id: event.id });
|
|
40
|
-
updateCount += 1;
|
|
41
|
-
console.log('deleted', event.project.id, event.id, event.startDate, i);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
console.log(i, 'events checked');
|
|
45
|
-
console.log(updateCount, 'events updated');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
main()
|
|
49
|
-
.then()
|
|
50
|
-
.catch(console.error);
|