Made webhook index stats optional
This commit is contained in:
@@ -324,7 +324,7 @@ export class PerformEndpointIndexService {
|
||||
for (const webhook of webhooks) {
|
||||
try {
|
||||
await this.#registerWebhookService.call(endpoint, webhook);
|
||||
indexStats.webhooks++;
|
||||
indexStats.webhooks = indexStats.webhooks ?? 0 + 1;
|
||||
} catch (error) {
|
||||
logger.error("Failed to register webhook", {
|
||||
endpointId: endpoint.id,
|
||||
|
||||
@@ -398,7 +398,7 @@ export type EndpointIndexError = z.infer<typeof EndpointIndexErrorSchema>;
|
||||
const IndexEndpointStatsSchema = z.object({
|
||||
jobs: z.number(),
|
||||
sources: z.number(),
|
||||
webhooks: z.number(),
|
||||
webhooks: z.number().optional(),
|
||||
dynamicTriggers: z.number(),
|
||||
dynamicSchedules: z.number(),
|
||||
disabledJobs: z.number().default(0),
|
||||
|
||||
Reference in New Issue
Block a user