Skip to content

Commit

Permalink
🐛 Fix sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed Sep 19, 2024
1 parent b28c629 commit 6b33f04
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,6 @@ export class WebhookDto {
}

export class EventPayload {
@ApiProperty({
type: String,
example: '801f9ede-c698-4e66-a7fc-48d19eebaa4f',
nullable: true,
description: 'The id of the event.',
})
id_event: string;

@ApiProperty({
type: String,
example: 'connection.created',
nullable: true,
description: 'The type of the event.',
})
type: string;

[key: string]: any;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ export class WebhookService {
}

async verifyPayloadSignature(
payload: EventPayload,
payload: { [key: string]: any },
signature: string,
secret: string,
): Promise<EventPayload> {
) {
try {
const expected = this.generateSignature(payload.data, secret);
if (expected !== signature) {
Expand Down
15 changes: 1 addition & 14 deletions packages/api/swagger/swagger-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9996,20 +9996,7 @@ components:
- scope
EventPayload:
type: object
properties:
id_event:
type: string
example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f
nullable: true
description: The id of the event.
type:
type: string
example: connection.created
nullable: true
description: The type of the event.
required:
- id_event
- type
properties: {}
SignatureVerificationDto:
type: object
properties:
Expand Down

0 comments on commit 6b33f04

Please sign in to comment.