diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-05-03 18:58:54 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-05-03 18:58:54 +0900 |
| commit | 12cd2709d6764986f01d1dbcb394f40c43a74c71 (patch) | |
| tree | 6828868f93984839363773a0cdcf4284719e7b26 /src/server/api | |
| parent | Merge branch 'develop' (diff) | |
| parent | 11.10.0 (diff) | |
| download | misskey-12cd2709d6764986f01d1dbcb394f40c43a74c71.tar.gz misskey-12cd2709d6764986f01d1dbcb394f40c43a74c71.tar.bz2 misskey-12cd2709d6764986f01d1dbcb394f40c43a74c71.zip | |
Merge branch 'develop'
Diffstat (limited to 'src/server/api')
| -rw-r--r-- | src/server/api/service/discord.ts | 8 | ||||
| -rw-r--r-- | src/server/api/service/github.ts | 8 | ||||
| -rw-r--r-- | src/server/api/service/twitter.ts | 8 |
3 files changed, 6 insertions, 18 deletions
diff --git a/src/server/api/service/discord.ts b/src/server/api/service/discord.ts index ac4d9a5601..29da17dd9e 100644 --- a/src/server/api/service/discord.ts +++ b/src/server/api/service/discord.ts @@ -203,12 +203,8 @@ router.get('/dc/cb', async ctx => { } const profile = await UserProfiles.createQueryBuilder() - .where('discord @> :discord', { - discord: { - id: id, - }, - }) - .andWhere('userHost IS NULL') + .where('"discordId" = :id', { id: id }) + .andWhere('"userHost" IS NULL') .getOne(); if (profile == null) { 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) { diff --git a/src/server/api/service/twitter.ts b/src/server/api/service/twitter.ts index 3a5800f00b..55369d0aee 100644 --- a/src/server/api/service/twitter.ts +++ b/src/server/api/service/twitter.ts @@ -141,12 +141,8 @@ router.get('/tw/cb', async ctx => { const result = await twAuth!.done(JSON.parse(twCtx), ctx.query.oauth_verifier); const link = await UserProfiles.createQueryBuilder() - .where('twitter @> :twitter', { - twitter: { - userId: result.userId, - }, - }) - .andWhere('userHost IS NULL') + .where('"twitterUserId" = :id', { id: result.userId }) + .andWhere('"userHost" IS NULL') .getOne(); if (link == null) { |