Skip to content

Commit 7261b40

Browse files
committed
feat(*): feat
1 parent 8884580 commit 7261b40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/plugin-js-lambda-microlib/src/MicroserviceType.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,16 +491,16 @@ export default class MicroserviceType {
491491
if ('%message' === type) {
492492
requirements['message'] = true;
493493
switch (options['position']) {
494-
case 'before': return ` ${conditionCode || ''}await message(${this.stringifyForHook(config['topic'], options)}, ${args ? (Array.isArray(args) ? (<any>args).join(', ') : args) : '{}'}, undefined, query);`;
495-
case 'after': return ` ${conditionCode || ''}await message(${this.stringifyForHook(config['topic'], options)}, ${args ? (Array.isArray(args) ? (<any>args).join(', ') : args) : '{}'}, result, query);`;
494+
case 'before': return ` ${conditionCode || ''}await message(${this.stringifyForHook(config['topic'], options)}, ${args ? (Array.isArray(args) ? (<any>args).join(', ') : args) : 'undefined'}, undefined, query);`;
495+
case 'after': return ` ${conditionCode || ''}await message(${this.stringifyForHook(config['topic'], options)}, ${args ? (Array.isArray(args) ? (<any>args).join(', ') : args) : 'undefined'}, result, query);`;
496496
default: return undefined;
497497
}
498498
}
499499
if ('%message:' === type.slice(0, 9)) {
500500
requirements['message'] = true;
501501
switch (options['position']) {
502-
case 'before': return ` ${conditionCode || ''}await message(${this.stringifyForHook(type.slice(9), options)}, ${args ? (Array.isArray(args) ? (<any>args).join(', ') : args) : '{}'}, undefined, query);`;
503-
case 'after': return ` ${conditionCode || ''}await message(${this.stringifyForHook(type.slice(9), options)}, ${args ? (Array.isArray(args) ? (<any>args).join(', ') : args) : '{}'}, result, query);`;
502+
case 'before': return ` ${conditionCode || ''}await message(${this.stringifyForHook(type.slice(9), options)}, ${args ? (Array.isArray(args) ? (<any>args).join(', ') : args) : 'undefined'}, undefined, query);`;
503+
case 'after': return ` ${conditionCode || ''}await message(${this.stringifyForHook(type.slice(9), options)}, ${args ? (Array.isArray(args) ? (<any>args).join(', ') : args) : 'undefined'}, result, query);`;
504504
default: return undefined;
505505
}
506506
}

0 commit comments

Comments
 (0)