From c69b72e1999578cba15e34677ebd366482cba734 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 9 Dec 2021 23:58:30 +0900 Subject: fix lint --- packages/backend/src/server/api/service/github.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'packages/backend/src/server/api/service/github.ts') diff --git a/packages/backend/src/server/api/service/github.ts b/packages/backend/src/server/api/service/github.ts index 07b4fe717e..5e0839df93 100644 --- a/packages/backend/src/server/api/service/github.ts +++ b/packages/backend/src/server/api/service/github.ts @@ -92,7 +92,7 @@ router.get('/connect/github', async ctx => { const params = { redirect_uri: `${config.url}/api/gh/cb`, scope: ['read:user'], - state: uuid() + state: uuid(), }; redisClient.set(userToken, JSON.stringify(params)); @@ -107,13 +107,13 @@ router.get('/signin/github', async ctx => { const params = { redirect_uri: `${config.url}/api/gh/cb`, scope: ['read:user'], - state: uuid() + state: uuid(), }; ctx.cookies.set('signin_with_github_sid', sessid, { path: '/', secure: config.url.startsWith('https'), - httpOnly: true + httpOnly: true, }); redisClient.set(sessid, JSON.stringify(params)); @@ -155,7 +155,7 @@ router.get('/gh/cb', async ctx => { const { accessToken } = await new Promise((res, rej) => oauth2!.getOAuthAccessToken(code, { - redirect_uri + redirect_uri, }, (err, accessToken, refresh, result) => { if (err) { rej(err); @@ -167,7 +167,7 @@ router.get('/gh/cb', async ctx => { })); const { login, id } = await getJson('https://api.github.com/user', 'application/vnd.github.v3+json', 10 * 1000, { - 'Authorization': `bearer ${accessToken}` + 'Authorization': `bearer ${accessToken}`, }); if (!login || !id) { ctx.throw(400, 'invalid session'); @@ -219,7 +219,7 @@ router.get('/gh/cb', async ctx => { })); const { login, id } = await getJson('https://api.github.com/user', 'application/vnd.github.v3+json', 10 * 1000, { - 'Authorization': `bearer ${accessToken}` + 'Authorization': `bearer ${accessToken}`, }); if (!login || !id) { @@ -229,7 +229,7 @@ router.get('/gh/cb', async ctx => { const user = await Users.findOneOrFail({ host: null, - token: userToken + token: userToken, }); const profile = await UserProfiles.findOneOrFail(user.id); @@ -241,8 +241,8 @@ router.get('/gh/cb', async ctx => { accessToken: accessToken, id: id, login: login, - } - } + }, + }, }); ctx.body = `GitHub: @${login} を、Misskey: @${user.username} に接続しました!`; @@ -250,7 +250,7 @@ router.get('/gh/cb', async ctx => { // Publish i updated event publishMainStream(user.id, 'meUpdated', await Users.pack(user, user, { detail: true, - includeSecrets: true + includeSecrets: true, })); } }); -- cgit v1.2.3-freya