mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 11:45:59 +00:00
code cleanup
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
class ElectronApi {
|
||||
// public port?: number;
|
||||
// public authorization?: string;
|
||||
private ipcRenderer = getIpcRenderer();
|
||||
|
||||
constructor() {
|
||||
// this.port = args.port;
|
||||
// this.authorization = args.authorization;
|
||||
}
|
||||
|
||||
send(msg, args = null) {
|
||||
|
||||
@@ -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