1
0
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:
2026-05-24 08:27:00 +00:00
parent cebd38698f
commit d5f5f54eb7
+1 -1
View File
@@ -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)
});