mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-19 09:18:01 +02:00
⚡️ Remove getServerSideProps on invite page + handle 404
This commit is contained in:
parent
5bbc7248bf
commit
cd05d7ab88
6 changed files with 76 additions and 54 deletions
|
@ -20,6 +20,7 @@ export const trpc = createTRPCNext<AppRouter>({
|
|||
queryClientConfig: {
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
retry: false,
|
||||
networkMode: "always",
|
||||
cacheTime: Infinity,
|
||||
staleTime: 1000 * 60,
|
||||
|
|
|
@ -247,4 +247,15 @@ export const auth = router({
|
|||
|
||||
return { user };
|
||||
}),
|
||||
getUserPermission: publicProcedure
|
||||
.input(z.object({ token: z.string() }))
|
||||
.query(async ({ input }) => {
|
||||
const res = await decryptToken<{ userId: string }>(input.token);
|
||||
|
||||
if (!res) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return res;
|
||||
}),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue