Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🎨 Move short circuit
Luke Vella4cdc409b8d56
diff --git a/apps/web/src/trpc/trpc.ts b/apps/web/src/trpc/trpc.tsindex 0e523c982..615abd10f 100644--- a/apps/web/src/trpc/trpc.ts+++ b/apps/web/src/trpc/trpc.ts@@ -76,15 +76,15 @@ export const privateProcedure = t.procedure.use();export const rateLimitMiddleware = middleware(async ({ ctx, next }) => {+ if (!process.env.KV_REST_API_URL) {+ return next();+ }+const ratelimit = new Ratelimit({redis: kv,limiter: Ratelimit.slidingWindow(5, "1 m"),});- if (!process.env.KV_REST_API_URL) {- return next();- }-const clientIp = requestIp.getClientIp(ctx.req);if (!clientIp) {