mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 08:16:00 +00:00
code cleanup
This commit is contained in:
@@ -6,11 +6,6 @@ try {
|
||||
} catch {}
|
||||
|
||||
export default function resolveApi() {
|
||||
const electron = getElectron();
|
||||
if (electron?.port) {
|
||||
return `http://localhost:${electron.port}`;
|
||||
}
|
||||
|
||||
if (apiUrl) {
|
||||
return apiUrl;
|
||||
}
|
||||
@@ -20,11 +15,5 @@ export default function resolveApi() {
|
||||
export function resolveApiHeaders() {
|
||||
const electron = getElectron();
|
||||
|
||||
if (electron?.authorization) {
|
||||
return {
|
||||
Authorization: electron.authorization,
|
||||
};
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user