From 0a8ceb9e6349284e75545a01ffad608b020f78e2 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Mon, 11 Dec 2023 01:12:54 +0100 Subject: Actually run prettier --- src/connections/GitHub/index.ts | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'src/connections/GitHub') diff --git a/src/connections/GitHub/index.ts b/src/connections/GitHub/index.ts index 25e5f89f..938b0686 100644 --- a/src/connections/GitHub/index.ts +++ b/src/connections/GitHub/index.ts @@ -42,10 +42,7 @@ export default class GitHubConnection extends Connection { settings: GitHubSettings = new GitHubSettings(); init(): void { - const settings = ConnectionLoader.getConnectionConfig( - this.id, - this.settings, - ); + const settings = ConnectionLoader.getConnectionConfig(this.id, this.settings); if (settings.enabled && (!settings.clientId || !settings.clientSecret)) throw new Error(`Invalid settings for connection ${this.id}`); @@ -65,18 +62,12 @@ export default class GitHubConnection extends Connection { getTokenUrl(code: string): string { const url = new URL(this.tokenUrl); url.searchParams.append("client_id", this.settings.clientId as string); - url.searchParams.append( - "client_secret", - this.settings.clientSecret as string, - ); + url.searchParams.append("client_secret", this.settings.clientSecret as string); url.searchParams.append("code", code); return url.toString(); } - async exchangeCode( - state: string, - code: string, - ): Promise { + async exchangeCode(state: string, code: string): Promise { this.validateState(state); const url = this.getTokenUrl(code); @@ -108,9 +99,7 @@ export default class GitHubConnection extends Connection { }); } - async handleCallback( - params: ConnectionCallbackSchema, - ): Promise { + async handleCallback(params: ConnectionCallbackSchema): Promise { const { state, code } = params; if (!code) throw new Error("No code provided"); -- cgit 1.5.1