Skip to content

Commit 20ddb7d

Browse files
committed
webhooks dto
1 parent 758a315 commit 20ddb7d

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

src/notification/presentation/controllers/webhook.controller.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ import { Body, Controller, Get, HttpStatus, Post, Query } from '@nestjs/common';
22
import { Inject } from '@nestjs/common';
33
import { IWebhookRepository } from '../../domain/interfaces/webhook-repository.interface';
44
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
5-
6-
class CreateWebhookDto {
7-
url: string;
8-
event: string;
9-
ownerId: string;
10-
}
5+
import { CreateWebhookDto } from '../dtos/webhook.dto';
116

127
@ApiTags('Webhooks')
138
@Controller('api/webhooks')
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { ApiProperty } from '@nestjs/swagger';
2+
3+
export class CreateWebhookDto {
4+
@ApiProperty({ description: 'The URL of the webhook' })
5+
url: string;
6+
7+
@ApiProperty({ description: 'The event type for the webhook' })
8+
event: string;
9+
10+
@ApiProperty({ description: 'The owner ID associated with the webhook' })
11+
ownerId: string;
12+
}

0 commit comments

Comments
 (0)