From e2f492039423b37d15836578797e9b60160678d0 Mon Sep 17 00:00:00 2001 From: Samuel Imolorhe Date: Mon, 17 Apr 2023 01:22:49 +0200 Subject: [PATCH] fixed api type --- packages/altair-api/src/auth/strategies/google.strategy.ts | 2 +- .../altair/services/electron-app/electron-app.service.ts | 3 ++- .../src/app/modules/altair/services/electron-app/ipc.ts | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 packages/altair-app/src/app/modules/altair/services/electron-app/ipc.ts diff --git a/packages/altair-api/src/auth/strategies/google.strategy.ts b/packages/altair-api/src/auth/strategies/google.strategy.ts index 505ae34ab4..722dca7b2a 100644 --- a/packages/altair-api/src/auth/strategies/google.strategy.ts +++ b/packages/altair-api/src/auth/strategies/google.strategy.ts @@ -31,7 +31,7 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { }); } - authenticate(req: Request, options) { + authenticate(req: Request, options: Record) { if (req.query.state) { options.state = req.query.state; } diff --git a/packages/altair-app/src/app/modules/altair/services/electron-app/electron-app.service.ts b/packages/altair-app/src/app/modules/altair/services/electron-app/electron-app.service.ts index 723580dfd0..c19ea623ac 100644 --- a/packages/altair-app/src/app/modules/altair/services/electron-app/electron-app.service.ts +++ b/packages/altair-app/src/app/modules/altair/services/electron-app/electron-app.service.ts @@ -20,6 +20,7 @@ import { downloadData, isElectronApp } from '../../utils'; import { RootState } from 'altair-graphql-core/build/types/state/state.interfaces'; import { HeaderState } from 'altair-graphql-core/build/types/state/header.interfaces'; import { IDictionary } from 'altair-graphql-core/build/types/shared'; +import { getIpc } from './ipc'; interface ConnectOptions { importFileContent: (content: string) => void; @@ -34,7 +35,7 @@ export class ElectronAppService { windowIds: string[] = []; activeWindowId = ''; - private ipc: IpcRenderer | undefined = (window as any).ipc; + private ipc = getIpc(); constructor( private store: Store, diff --git a/packages/altair-app/src/app/modules/altair/services/electron-app/ipc.ts b/packages/altair-app/src/app/modules/altair/services/electron-app/ipc.ts new file mode 100644 index 0000000000..30f35e1395 --- /dev/null +++ b/packages/altair-app/src/app/modules/altair/services/electron-app/ipc.ts @@ -0,0 +1,7 @@ +import { IpcRenderer } from 'electron'; + +export const getIpc = () => { + const ipc: IpcRenderer | undefined = (window as any).ipc; + + return ipc; +};