mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-01 10:11:50 +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
|
@ -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