diff --git a/app/api/templates/base.html b/app/api/templates/base.html index 65988b956..8e6950db2 100644 --- a/app/api/templates/base.html +++ b/app/api/templates/base.html @@ -20,7 +20,7 @@ - + diff --git a/app/next-client-app/api/index.ts b/app/next-client-app/api/index.ts index 89dacaccd..95b1e01aa 100644 --- a/app/next-client-app/api/index.ts +++ b/app/next-client-app/api/index.ts @@ -1,5 +1,6 @@ "use server"; import request from "@/lib/api/request"; +import { redirect } from "next/navigation"; const fetchKeys = { specificUser: () => `userspecific`, @@ -9,6 +10,7 @@ export async function getUser(): Promise { try { return await request(fetchKeys.specificUser()); } catch (error) { - return []; + console.log("dasd"); + redirect("/accounts/login/"); } } diff --git a/app/next-client-app/app/layout.tsx b/app/next-client-app/app/layout.tsx index 041223b4f..edfc017e0 100644 --- a/app/next-client-app/app/layout.tsx +++ b/app/next-client-app/app/layout.tsx @@ -16,7 +16,7 @@ export default async function RootLayout({ }: Readonly<{ children: React.ReactNode; }>) { - const user = await getUser(); + // const user = await getUser(); return (