summaryrefslogtreecommitdiff
path: root/src/server/api/service/twitter.ts
diff options
context:
space:
mode:
authorSatsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>2019-05-03 18:38:19 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-05-03 18:38:19 +0900
commit0e764a2b3e2aed345750b87f4a77bee345598c69 (patch)
tree80eed4ef3749bb15c8d5a143e220f49d39afb8dc /src/server/api/service/twitter.ts
parentSome import and export fixes (#4842) (diff)
downloadsharkey-0e764a2b3e2aed345750b87f4a77bee345598c69.tar.gz
sharkey-0e764a2b3e2aed345750b87f4a77bee345598c69.tar.bz2
sharkey-0e764a2b3e2aed345750b87f4a77bee345598c69.zip
Fix external service authentication (#4846)
Diffstat (limited to 'src/server/api/service/twitter.ts')
-rw-r--r--src/server/api/service/twitter.ts8
1 files changed, 2 insertions, 6 deletions
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) {