diff --git a/middleware.ts b/middleware.ts index bc4566d..cc8f478 100644 --- a/middleware.ts +++ b/middleware.ts @@ -5,6 +5,8 @@ import { Ratelimit } from "@upstash/ratelimit"; import { Redis } from "@upstash/redis"; import { env } from "./env.mjs"; +const shitList = ["ama.ab.ca"]; + const rateLimit = new Ratelimit({ redis: Redis.fromEnv(), limiter: Ratelimit.slidingWindow( @@ -35,9 +37,17 @@ export default authMiddleware({ if (auth.userId) { const email = auth.sessionClaims.email as string; - if (email.includes("ama.ab.ca")) { + + let isShit = false; + shitList.forEach((shitItem) => { + if (email.includes(shitItem)) { + isShit = true; + } + }); + + if (isShit) { return NextResponse.redirect( - "https://www.youtube.com/watch?v=dQw4w9WgXcQ" + "https://www.youtube.com/watch?v=L_jWHffIx5E" ); } } diff --git a/package.json b/package.json index c8b34a1..7a5454b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sprintpadawan", - "version": "3.3.0", + "version": "3.3.1", "description": "Plan. Sprint. Repeat.", "private": true, "scripts": {