fixed api url
This commit is contained in:
parent
e23add8881
commit
4448740277
@ -78,6 +78,7 @@ export async function del<T>(endpoint: string, options?: RequestOptions): Promis
|
||||
function buildUrl(endpoint: string, params?: Record<string, string | number | boolean>): string {
|
||||
const url = new URL(`${API_BASE_URL}${endpoint}`);
|
||||
url.port = window.location.port;
|
||||
url.protocol = window.location.protocol;
|
||||
|
||||
if (params) {
|
||||
Object.entries(params).forEach(([key, value]) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user