Merge branch 'ship' of gitea.51mars.com:Oak-Team/oak-pay-business into ship

This commit is contained in:
Xu Chang 2025-02-21 21:41:52 +08:00
commit 2b4a60be99
3 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,7 @@ const triggers = [
entity: 'accountOper',
action: 'create',
when: 'before',
asRoot: true,
fn: async ({ operation }, context, option) => {
const { id, data } = operation;
assert(!(data instanceof Array));

View File

@ -10,6 +10,7 @@ const triggers = [
entity: 'accountOper',
action: 'create',
when: 'before',
asRoot: true,
fn: async ({ operation }, context, option) => {
const { id, data } = operation;
(0, assert_1.default)(!(data instanceof Array));

View File

@ -11,6 +11,7 @@ const triggers: Trigger<EntityDict, 'accountOper', BRC>[] = [
entity: 'accountOper',
action: 'create',
when: 'before',
asRoot: true,
fn: async ({ operation }, context, option) => {
const { id, data } = operation;
assert(!(data instanceof Array));
@ -57,7 +58,7 @@ const triggers: Trigger<EntityDict, 'accountOper', BRC>[] = [
context.saveOperationToEvent(id, `${DATA_SUBSCRIBER_KEYS.accountNumberChanged}-${accountId}`);
return 1;
},
} as CreateTriggerInTxn<EntityDict, 'accountOper', BRC>,
} as CreateTriggerInTxn<EntityDict, 'accountOper', BRC>,
];
export default triggers;