Skip to content

Commit

Permalink
fix(tenant-management): provide context to the event connector
Browse files Browse the repository at this point in the history
earlier it was codebuild id so it was not required to be forwarded but now the context needs to be
sent over

GH-0
  • Loading branch information
shubhamp-sf committed Jul 29, 2024
1 parent 524e1f0 commit 647c8af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ describe('TenantController', () => {
.get('/tenants')
.set('Authorization', token)
.expect(STATUS_CODE.OK);
console.log(body);
expect(body.length).to.eql(1);
expect(body[0].name).to.eql(mockTenant.name);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,19 @@ export class ProvisioningService<T extends SubscriptionDTO>
throw new HttpErrors.InternalServerError();
}

const context = randomUUID();

await this.eventConnector.publish({
type: EventTypes.TENANT_PROVISIONING,
tenant: tenant,
subscription: subscription,
secret: hmacSecret,
context: context,
});

await this.webhookSecretRepo.set(tenant.id, {
secret: hmacSecret,
context: randomUUID(),
context: context,
});

await this.webhookSecretRepo.expire(
Expand Down

0 comments on commit 647c8af

Please sign in to comment.