mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 20:53:57 +00:00
20 lines
331 B
TypeScript
20 lines
331 B
TypeScript
import getElectron from './getElectron';
|
|
|
|
let apiUrl = null;
|
|
try {
|
|
apiUrl = process.env.API_URL;
|
|
} catch {}
|
|
|
|
export default function resolveApi() {
|
|
if (apiUrl) {
|
|
return apiUrl;
|
|
}
|
|
return window.location.href.replace(/\/*$/, '');
|
|
}
|
|
|
|
export function resolveApiHeaders() {
|
|
const electron = getElectron();
|
|
|
|
return {};
|
|
}
|