From d12751006e98ef11f3bec8f45fd50d91c2cb4a10 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Thu, 22 Dec 2022 21:15:38 -0500 Subject: add epic games connection --- src/connections/GitHub/index.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/connections/GitHub/index.ts') diff --git a/src/connections/GitHub/index.ts b/src/connections/GitHub/index.ts index fc44ff9d..5f255e66 100644 --- a/src/connections/GitHub/index.ts +++ b/src/connections/GitHub/index.ts @@ -1,7 +1,12 @@ +import { + Config, + ConnectedAccount, + ConnectionCallbackSchema, + ConnectionLoader, + DiscordApiErrors, +} from "@fosscord/util"; import fetch from "node-fetch"; -import { Config, ConnectedAccount, ConnectionCallbackSchema, DiscordApiErrors } from "../../util"; import Connection from "../../util/connections/Connection"; -import { ConnectionLoader } from "../../util/connections/ConnectionLoader"; import { GitHubSettings } from "./GitHubSettings"; interface OAuthTokenResponse { @@ -89,7 +94,9 @@ export default class GitHubConnection extends Connection { }).then((res) => res.json()); } - async handleCallback(params: ConnectionCallbackSchema): Promise { + async handleCallback( + params: ConnectionCallbackSchema, + ): Promise { const userId = this.getUserId(params.state); const token = await this.exchangeCode(params.state, params.code!); const userInfo = await this.getUser(token); -- cgit 1.4.1