diff --git a/server/src/ts/index.ts b/server/src/ts/index.ts index 5e72ca2..2605075 100644 --- a/server/src/ts/index.ts +++ b/server/src/ts/index.ts @@ -55,8 +55,8 @@ const main = async (): Promise => { config.auth.twitch === undefined ? undefined : Jwks({ - jwksUri: config.auth.twitch.jwk, - }); + jwksUri: config.auth.twitch.jwk, + }); const verifyWith = async ( token: string, @@ -120,7 +120,7 @@ const main = async (): Promise => { }); const payload = ticket.getPayload(); if (payload !== undefined) { - const { id, name } = await store.findOrCreateUser( + const { id, name } = await store.findOrCreateGoogleUser( payload.sub, payload.name ); @@ -213,9 +213,8 @@ const main = async (): Promise => { d.author = d.author.name; return { content: Json5.stringify(c, undefined, 2), - name: `${d.name.replace(/\s/g, "-")}-${ - d.language - }-${Uuid.v4()}.deck.json5`, + name: `${d.name.replace(/\s/g, "-")}-${d.language + }-${Uuid.v4()}.deck.json5`, }; }), filename: "backup.zip", diff --git a/server/src/ts/store.ts b/server/src/ts/store.ts index f56b6c3..3dc9815 100644 --- a/server/src/ts/store.ts +++ b/server/src/ts/store.ts @@ -74,7 +74,7 @@ export class Store { }); } - public findOrCreateUser: ( + public findOrCreateGoogleUser: ( googleId: string, googleName?: string ) => Promise = async (googleId, googleName) =>