* --init * clean up * unnecessary comment * remove comment * fix factory resolver * Add active filter to webhook query
16 lines
516 B
TypeScript
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);
|
|
};
|