|
@@ -52,13 +52,6 @@ class Server {
|
|
options = requestInterceptor(options);
|
|
options = requestInterceptor(options);
|
|
const { method = "GET", url, headers = {}, data = {}, body, ...other } = options;
|
|
const { method = "GET", url, headers = {}, data = {}, body, ...other } = options;
|
|
const params = JSON.stringify(data);
|
|
const params = JSON.stringify(data);
|
|
- console.log(`🚀🚀🚀🚀🚀-> in index.ts on 55`, {
|
|
|
|
- Token: cookies().get("Token")?.value || "",
|
|
|
|
- "Content-Type": "application/json",
|
|
|
|
- language: cookies().get("language")?.value || defaultLocale,
|
|
|
|
- url: url,
|
|
|
|
- ...headers,
|
|
|
|
- });
|
|
|
|
try {
|
|
try {
|
|
const response = await fetch(`${this.BASE_URL}${url}`, {
|
|
const response = await fetch(`${this.BASE_URL}${url}`, {
|
|
method: method,
|
|
method: method,
|
|
@@ -76,7 +69,6 @@ class Server {
|
|
console.log(`🚀🚀🚀🚀🚀-> in index.ts on 68`, error);
|
|
console.log(`🚀🚀🚀🚀🚀-> in index.ts on 68`, error);
|
|
return {};
|
|
return {};
|
|
});
|
|
});
|
|
- console.log(`🚀🚀🚀🚀🚀-> in index.ts on 79`, response);
|
|
|
|
return responseInterceptor<T, R>(response, options, this.BASE_URL);
|
|
return responseInterceptor<T, R>(response, options, this.BASE_URL);
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.log(
|
|
console.log(
|