From 551bfc70be9e5d81d957ae9af1df5f75f27cc8ef Mon Sep 17 00:00:00 2001 From: Aditya Paul <122125787+Paulie-Aditya@users.noreply.github.com> Date: Wed, 17 Sep 2025 12:08:07 +0530 Subject: [PATCH] fixing view count still counting for same ip + double counting --- pages/api/incr.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/incr.ts b/pages/api/incr.ts index 79c2ba0e..860c4c6d 100644 --- a/pages/api/incr.ts +++ b/pages/api/incr.ts @@ -39,7 +39,7 @@ export default async function incr(req: NextRequest): Promise { ex: 24 * 60 * 60, }); if (!isNew) { - new NextResponse(null, { status: 202 }); + return new NextResponse(null, { status: 202 }); } } await redis.incr(["pageviews", "projects", slug].join(":"));