From 626cfb61ac3940bee7a3acf1b1c5c4cae4ae410c Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 10 Apr 2019 15:04:27 +0900 Subject: テーブル分割 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/service/github.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/api/service/github.ts') diff --git a/src/server/api/service/github.ts b/src/server/api/service/github.ts index e59b149d19..580947811b 100644 --- a/src/server/api/service/github.ts +++ b/src/server/api/service/github.ts @@ -8,7 +8,7 @@ import redis from '../../../db/redis'; import * as uuid from 'uuid'; import signin from '../common/signin'; import fetchMeta from '../../../misc/fetch-meta'; -import { Users, UserServiceLinkings } from '../../../models'; +import { Users, UserProfiles } from '../../../models'; import { ILocalUser } from '../../../models/entities/user'; function getUserToken(ctx: Koa.BaseContext) { @@ -45,7 +45,7 @@ router.get('/disconnect/github', async ctx => { token: userToken }); - await UserServiceLinkings.update({ + await UserProfiles.update({ userId: user.id }, { github: false, @@ -191,7 +191,7 @@ router.get('/gh/cb', async ctx => { return; } - const link = await UserServiceLinkings.createQueryBuilder() + const link = await UserProfiles.createQueryBuilder() .where('github @> :github', { github: { id: id, @@ -263,7 +263,7 @@ router.get('/gh/cb', async ctx => { token: userToken }); - await UserServiceLinkings.update({ userId: user.id }, { + await UserProfiles.update({ userId: user.id }, { github: true, githubAccessToken: accessToken, githubId: id, -- cgit v1.2.3-freya