mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-11-14 00:43:50 +00:00
optional import in API_STRING
This commit is contained in:
parent
30ea6032c9
commit
c107fcff44
@ -1,5 +1,7 @@
|
||||
import { API_SERVER_IP, API_SERVER_PORT } from '$env/static/private';
|
||||
import * as env from '$env/static/private';
|
||||
|
||||
export function buildAPIStr(endpoint: string) {
|
||||
const API_SERVER_IP = env.API_SERVER_IP;
|
||||
const API_SERVER_PORT = env.API_SERVER_PORT;
|
||||
return `http://${API_SERVER_IP ?? 'localhost'}:${API_SERVER_PORT ?? '8080'}/${endpoint}`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user