mirror of
https://github.com/XFox111/bonch-calendar.git
synced 2026-06-30 10:52:41 +03:00
fix: use URL to construct API requests
This commit is contained in:
@@ -18,7 +18,7 @@ async function fetchApi<T>(path: string, defaultValue: T, alwaysReturnResponse:
|
||||
{
|
||||
try
|
||||
{
|
||||
const res = await fetch(import.meta.env.VITE_BACKEND_HOST + path, {
|
||||
const res = await fetch(new URL(path, import.meta.env.VITE_BACKEND_HOST), {
|
||||
signal: AbortSignal.timeout(timeout)
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user