From 62c39773dbe8580ac6538331108289f62f9a1bd1 Mon Sep 17 00:00:00 2001 From: pvk05 Date: Mon, 3 Feb 2025 12:37:46 +0100 Subject: [PATCH] change redirect on activate route --- app/api/v2/auth/activate/[token]/route.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/api/v2/auth/activate/[token]/route.js b/app/api/v2/auth/activate/[token]/route.js index f5f2f29..07765bd 100644 --- a/app/api/v2/auth/activate/[token]/route.js +++ b/app/api/v2/auth/activate/[token]/route.js @@ -1,5 +1,6 @@ import prisma from "@/prisma/prismaClient"; +import { redirect } from "next/navigation"; import { NextResponse } from "next/server"; export async function GET(req, {params}) { @@ -44,6 +45,6 @@ export async function GET(req, {params}) { activatedAt: new Date() } }) - - return NextResponse.redirect(new URL("/auth/signIn", req.url)) + + redirect("/auth/signIn") } \ No newline at end of file