feat: fixed adding channels

This commit is contained in:
Nevo David 2025-05-17 09:46:43 +07:00
parent c951720a6e
commit 37d2e0e202
2 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,3 @@
'use client';
export interface Params {
baseUrl: string;
beforeRequest?: (url: string, options: RequestInit) => Promise<RequestInit>;
@ -16,7 +14,7 @@ export const customFetch = (
secured: boolean = true
) => {
return async function newFetch(url: string, options: RequestInit = {}) {
const loggedAuth = new URL(window.location.href).searchParams.get(
const loggedAuth = typeof window === "undefined" ? undefined : new URL(window.location.href).searchParams.get(
'loggedAuth'
);
const newRequestObject = await params?.beforeRequest?.(url, options);

View File

@ -1,5 +1,5 @@
import { customFetch } from './custom.fetch.func';
import { cookies } from 'next/headers';
import { customFetch } from '@gitroom/helpers/utils/custom.fetch.func';
export const internalFetch = (url: string, options: RequestInit = {}) =>
customFetch(