Convert url to string before fetching

This commit is contained in:
Jackson Harper
2024-02-28 13:05:00 +08:00
parent d2bf31d9c5
commit fa69f7b47b

View File

@ -62,8 +62,7 @@ export function gqlFetcher(
export function apiFetcher(path: string): Promise<unknown> {
const url = new URL(path, fetchEndpoint)
console.log('fetching: ', url)
return fetch(url, {
return fetch(url.toString(), {
headers: requestHeaders(),
credentials: 'include',
mode: 'cors',