|
@@ -1,4 +1,4 @@
|
|
|
-import { redirect } from "@/i18n/routing";
|
|
|
+import { defaultLocale, redirect } from "@/i18n/routing";
|
|
|
import { Response } from "@/types";
|
|
|
import { cookies } from "next/headers";
|
|
|
import { ServerOptions } from "./type";
|
|
@@ -55,7 +55,7 @@ class Server {
|
|
|
console.log(`🚀🚀🚀🚀🚀-> in index.ts on 55`, {
|
|
|
Token: cookies().get("Token")?.value || "",
|
|
|
"Content-Type": "application/json",
|
|
|
- language: cookies().get("language")?.value || cookies().get("NEXT_LOCALE")?.value,
|
|
|
+ language: cookies().get("language")?.value || defaultLocale,
|
|
|
url: url,
|
|
|
...headers,
|
|
|
});
|
|
@@ -65,8 +65,7 @@ class Server {
|
|
|
headers: {
|
|
|
Token: cookies().get("Token")?.value || "",
|
|
|
"Content-Type": "application/json",
|
|
|
- language:
|
|
|
- cookies().get("language")?.value || cookies().get("NEXT_LOCALE")?.value,
|
|
|
+ language: cookies().get("language")?.value || defaultLocale,
|
|
|
...headers,
|
|
|
},
|
|
|
body: params,
|