From 0e764a2b3e2aed345750b87f4a77bee345598c69 Mon Sep 17 00:00:00 2001 From: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com> Date: Fri, 3 May 2019 18:38:19 +0900 Subject: Fix external service authentication (#4846) --- src/server/api/service/github.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 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 4f287406d1..de1e15f079 100644 --- a/src/server/api/service/github.ts +++ b/src/server/api/service/github.ts @@ -193,12 +193,8 @@ router.get('/gh/cb', async ctx => { } const link = await UserProfiles.createQueryBuilder() - .where('github @> :github', { - github: { - id: id, - }, - }) - .andWhere('userHost IS NULL') + .where('"githubId" = :id', { id: id }) + .andWhere('"userHost" IS NULL') .getOne(); if (link == null) { -- cgit v1.2.3-freya