@servicelabsco/slabs-access-manager 0.1.79 → 0.1.80
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.
|
@@ -39,13 +39,14 @@ let WebhookPollCommand = class WebhookPollCommand extends nestjs_utility_service
|
|
|
39
39
|
await this.handle();
|
|
40
40
|
}
|
|
41
41
|
async processJob(data, fn) {
|
|
42
|
-
await fn.setRequest(data);
|
|
42
|
+
const request = await fn.setRequest(data);
|
|
43
43
|
const job = await fn.webhookService.getJob(data.type);
|
|
44
44
|
if (!job) {
|
|
45
45
|
global.console.log('cannot find job for type ', data.type);
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
const payload = { id: request.id, data };
|
|
49
|
+
await fn.queueService.addJob(job, payload);
|
|
49
50
|
}
|
|
50
51
|
async setRequest(data) {
|
|
51
52
|
const { slug, type, method } = data;
|
|
@@ -62,7 +63,7 @@ __decorate([
|
|
|
62
63
|
}),
|
|
63
64
|
__param(0, (0, nestjs_command_1.Option)({
|
|
64
65
|
name: 'type',
|
|
65
|
-
describe: '
|
|
66
|
+
describe: 'webhook name to pull (sqs.{type}.webhook.queue)',
|
|
66
67
|
type: 'string',
|
|
67
68
|
alias: 't',
|
|
68
69
|
required: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.poll.command.js","sourceRoot":"","sources":["../../../src/access/commands/webhook.poll.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,oFAOgD;AAChD,mDAAiD;AACjD,gGAA2F;AAC3F,iEAA6D;
|
|
1
|
+
{"version":3,"file":"webhook.poll.command.js","sourceRoot":"","sources":["../../../src/access/commands/webhook.poll.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,oFAOgD;AAChD,mDAAiD;AACjD,gGAA2F;AAC3F,iEAA6D;AAUtD,IAAM,kBAAkB,GAAxB,MAAM,kBAAm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