(auth: AuthContext | null, webhookId: string)
| 253 | // Delivery history |
| 254 | |
| 255 | async listDeliveries(auth: AuthContext | null, webhookId: string): Promise<WebhookDelivery[]> { |
| 256 | const webhook = await this.repository.findById(webhookId, { |
| 257 | organizationId: auth?.organizationId, |
| 258 | }); |
| 259 | if (!webhook) { |
| 260 | throw new NotFoundException(`Webhook ${webhookId} not found`); |
| 261 | } |
| 262 | |
| 263 | const records = await this.deliveryRepository.listByWebhookId(webhookId); |
| 264 | return records.map((r) => this.mapDeliveryRecord(r)); |
| 265 | } |
| 266 | |
| 267 | async getDelivery(auth: AuthContext | null, deliveryId: string): Promise<WebhookDelivery> { |
| 268 | const delivery = await this.deliveryRepository.findById(deliveryId); |
no test coverage detected