From a8a39537565ace566020a58c6f0a6b0ed3bf904b Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Wed, 24 Apr 2024 12:23:04 +0200 Subject: [PATCH] :bug: redirect to login when not connected on subscription --- src/middleware.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/middleware.ts b/src/middleware.ts index 2dd79c03..5fd74a52 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -2,13 +2,13 @@ import { ICustomerJwtPayload, IUserJwtPayload } from "@Front/Services/JwtService import jwt_decode from "jwt-decode"; import { NextResponse } from "next/server"; import type { NextRequest } from "next/server"; -import TagManager from "react-gtm-module"; +/* import TagManager from "react-gtm-module"; const tagManagerArgs = { gtmId: "GTM-5GLJN86P", }; -TagManager.initialize(tagManagerArgs); +TagManager.initialize(tagManagerArgs); */ export async function middleware(request: NextRequest) { // Get the JWT from the cookies @@ -46,5 +46,6 @@ export const config = { "/offices/:path*", "/roles/:path*", "/users/:path*", + "/subscription/:path*", ], };