mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
24 lines
452 B
TypeScript
24 lines
452 B
TypeScript
import { prisma } from '@documenso/prisma';
|
|
|
|
export type GetTeamInvitationsOptions = {
|
|
email: string;
|
|
};
|
|
|
|
export const getTeamInvitations = async ({ email }: GetTeamInvitationsOptions) => {
|
|
return await prisma.teamMemberInvite.findMany({
|
|
where: {
|
|
email,
|
|
},
|
|
include: {
|
|
team: {
|
|
select: {
|
|
id: true,
|
|
name: true,
|
|
url: true,
|
|
avatarImageId: true,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
};
|