mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 17:21:41 +10:00
feat: wip
This commit is contained in:
22
packages/lib/server-only/team/get-team-invitations.ts
Normal file
22
packages/lib/server-only/team/get-team-invitations.ts
Normal file
@ -0,0 +1,22 @@
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user