@ -39,12 +39,14 @@ export const publicProcedure = t.procedure;
export const authProcedure = publicProcedure.use(
async ({ ctx: { jwt }, next }) => {
if (!jwt) {
throw new TRPCError({ code: "UNAUTHORIZED" });
throw new TRPCError({
code: "UNAUTHORIZED",
message: JSON.stringify(jwt),
});
}
if (!jwt.id) {
jwt.email;
return await next({
ctx: { jwt },