MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getInviteById

Function getInviteById

packages/db/src/services/organization.service.ts:81–100  ·  view source on GitHub ↗
(inviteId: string)

Source from the content-addressed store, hash-verified

79}
80
81export async function getInviteById(inviteId: string) {
82 const res = await db.invite.findUnique({
83 where: {
84 id: inviteId,
85 },
86 include: {
87 organization: {
88 select: {
89 id: true,
90 name: true,
91 },
92 },
93 },
94 });
95
96 return {
97 ...res,
98 isExpired: res?.expiresAt && res.expiresAt < new Date(),
99 };
100}
101
102export async function getMembers(organizationId: string) {
103 const [members, access] = await Promise.all([

Callers 1

organization.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected