File size: 763 Bytes
a271c58 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | import { Injectable } from '@nestjs/common';
import { WebhooksRepository } from '@gitroom/nestjs-libraries/database/prisma/webhooks/webhooks.repository';
import { WebhooksDto } from '@gitroom/nestjs-libraries/dtos/webhooks/webhooks.dto';
@Injectable()
export class WebhooksService {
constructor(private _webhooksRepository: WebhooksRepository) {}
getTotal(orgId: string) {
return this._webhooksRepository.getTotal(orgId);
}
getWebhooks(orgId: string) {
return this._webhooksRepository.getWebhooks(orgId);
}
createWebhook(orgId: string, body: WebhooksDto) {
return this._webhooksRepository.createWebhook(orgId, body);
}
deleteWebhook(orgId: string, id: string) {
return this._webhooksRepository.deleteWebhook(orgId, id);
}
}
|