({ request }: LoaderFunctionArgs)
| 18 | import { invitesPath, rootPath } from "~/utils/pathBuilder"; |
| 19 | |
| 20 | export const loader = async ({ request }: LoaderFunctionArgs) => { |
| 21 | const user = await requireUser(request); |
| 22 | |
| 23 | //if there are no invites left we should redirect to the orgs page |
| 24 | const invites = await getUsersInvites({ email: user.email }); |
| 25 | if (invites.length === 0) { |
| 26 | throw redirect(rootPath()); |
| 27 | } |
| 28 | |
| 29 | return typedjson({ invites }); |
| 30 | }; |
| 31 | |
| 32 | const schema = z.object({ |
| 33 | inviteId: z.string(), |
nothing calls this directly
no test coverage detected
searching dependent graphs…