2024-02-09 16:07:33 +02:00
|
|
|
import { prisma } from '@documenso/prisma';
|
|
|
|
|
|
|
|
|
|
export const getWebhooksByUserId = async (userId: number) => {
|
|
|
|
|
return await prisma.webhook.findMany({
|
|
|
|
|
where: {
|
|
|
|
|
userId,
|
2024-04-25 23:32:59 +07:00
|
|
|
teamId: null,
|
2024-02-09 16:07:33 +02:00
|
|
|
},
|
2024-02-24 11:18:58 +02:00
|
|
|
orderBy: {
|
|
|
|
|
createdAt: 'desc',
|
|
|
|
|
},
|
2024-02-09 16:07:33 +02:00
|
|
|
});
|
|
|
|
|
};
|