️ Remove getServerSideProps on invite page + handle 404

This commit is contained in:
Luke Vella 2023-06-20 11:25:34 +01:00
parent 5bbc7248bf
commit cd05d7ab88
6 changed files with 76 additions and 54 deletions

View file

@ -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;
}),
});