enable waitlisting in cloud

This commit is contained in:
KM Koushik
2025-09-17 22:13:03 +10:00
parent 8c8af1f846
commit e1cb1f27d1
6 changed files with 41 additions and 6 deletions

View File

@@ -99,7 +99,7 @@ export const publicProcedure = t.procedure;
* @see https://trpc.io/docs/procedures
*/
export const protectedProcedure = t.procedure.use(({ ctx, next }) => {
if (!ctx.session || !ctx.session.user) {
if (!ctx.session || !ctx.session.user || ctx.session.user.isWaitlisted) {
throw new TRPCError({ code: "UNAUTHORIZED" });
}