mirror of
https://github.com/documenso/documenso.git
synced 2025-11-21 20:21:38 +10:00
wip: what if user ids were strings instead of numbers
This commit is contained in:
@ -6,7 +6,7 @@ export interface CreateWebhookOptions {
|
||||
eventTriggers: WebhookTriggerEvents[];
|
||||
secret: string | null;
|
||||
enabled: boolean;
|
||||
userId: number;
|
||||
userId: string;
|
||||
teamId?: number;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ import { prisma } from '@documenso/prisma';
|
||||
|
||||
export type DeleteWebhookByIdOptions = {
|
||||
id: string;
|
||||
userId: number;
|
||||
userId: string;
|
||||
teamId?: number;
|
||||
};
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import { prisma } from '@documenso/prisma';
|
||||
export type EditWebhookOptions = {
|
||||
id: string;
|
||||
data: Omit<Prisma.WebhookUpdateInput, 'id' | 'userId' | 'teamId'>;
|
||||
userId: number;
|
||||
userId: string;
|
||||
teamId?: number;
|
||||
};
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import type { WebhookTriggerEvents } from '@documenso/prisma/client';
|
||||
|
||||
export type GetAllWebhooksByEventTriggerOptions = {
|
||||
event: WebhookTriggerEvents;
|
||||
userId: number;
|
||||
userId: string;
|
||||
teamId?: number;
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ import { prisma } from '@documenso/prisma';
|
||||
|
||||
export type GetWebhookByIdOptions = {
|
||||
id: string;
|
||||
userId: number;
|
||||
userId: string;
|
||||
teamId?: number;
|
||||
};
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
export const getWebhooksByTeamId = async (teamId: number, userId: number) => {
|
||||
export const getWebhooksByTeamId = async (teamId: number, userId: string) => {
|
||||
return await prisma.webhook.findMany({
|
||||
where: {
|
||||
team: {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
export const getWebhooksByUserId = async (userId: number) => {
|
||||
export const getWebhooksByUserId = async (userId: string) => {
|
||||
return await prisma.webhook.findMany({
|
||||
where: {
|
||||
userId,
|
||||
|
||||
@ -7,7 +7,7 @@ import { getAllWebhooksByEventTrigger } from '../get-all-webhooks-by-event-trigg
|
||||
export type TriggerWebhookOptions = {
|
||||
event: WebhookTriggerEvents;
|
||||
data: Record<string, unknown>;
|
||||
userId: number;
|
||||
userId: string;
|
||||
teamId?: number;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user