Files
calendar/packages/trpc/server/routers/viewer/webhook/get.handler.ts
T
Syed Ali ShahbazandGitHub 4115eaacbd chore: Add initial webhook wiring (TRPC handlers) to the new architecture (#27170)
* --init

* clean up

* unnecessary comment

* remove comment

* fix factory resolver

* Add active filter to webhook query
2026-01-23 16:50:34 +04:00

16 lines
516 B
TypeScript

import { getWebhookFeature } from "@calcom/features/di/webhooks/containers/webhook";
import type { TrpcSessionUser } from "@calcom/trpc/server/types";
import type { TGetInputSchema } from "./get.schema";
type GetOptions = {
ctx: {
user: NonNullable<TrpcSessionUser>;
};
input: TGetInputSchema;
};
export const getHandler = async ({ ctx: _ctx, input }: GetOptions) => {
const { repository: webhookRepository } = getWebhookFeature();
return await webhookRepository.findByWebhookId(input.webhookId);
};