code cleanup

This commit is contained in:
Jan Prochazka
2021-12-26 13:37:00 +01:00
parent 576987ad8c
commit 22295ceef2
3 changed files with 4 additions and 26 deletions

View File

@@ -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) {

View File

@@ -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 {};
}