From 5c3a56b2832ac625552a7d261cd38fb118d813f4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 23 Mar 2021 14:54:09 +0900 Subject: fix bug https://github.com/syuilo/misskey/commit/48ea805999c6cb8e900aeaec6edaf68788bd51e0#commitcomment-48584326 --- src/server/api/service/twitter.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/server/api/service/twitter.ts') diff --git a/src/server/api/service/twitter.ts b/src/server/api/service/twitter.ts index 97e9d3a7fc..7985042d27 100644 --- a/src/server/api/service/twitter.ts +++ b/src/server/api/service/twitter.ts @@ -2,7 +2,7 @@ import * as Koa from 'koa'; import * as Router from '@koa/router'; import { v4 as uuid } from 'uuid'; import autwh from 'autwh'; -import redis from '../../../db/redis'; +import { redisClient } from '../../../db/redis'; import { publishMainStream } from '../../../services/stream'; import config from '../../../config'; import signin from '../common/signin'; @@ -89,7 +89,7 @@ router.get('/connect/twitter', async ctx => { const twAuth = await getTwAuth(); const twCtx = await twAuth!.begin(); - redis.set(userToken, JSON.stringify(twCtx)); + redisClient.set(userToken, JSON.stringify(twCtx)); ctx.redirect(twCtx.url); }); @@ -99,7 +99,7 @@ router.get('/signin/twitter', async ctx => { const sessid = uuid(); - redis.set(sessid, JSON.stringify(twCtx)); + redisClient.set(sessid, JSON.stringify(twCtx)); ctx.cookies.set('signin_with_twitter_sid', sessid, { path: '/', @@ -124,7 +124,7 @@ router.get('/tw/cb', async ctx => { } const get = new Promise((res, rej) => { - redis.get(sessid, async (_, twCtx) => { + redisClient.get(sessid, async (_, twCtx) => { res(twCtx); }); }); @@ -153,7 +153,7 @@ router.get('/tw/cb', async ctx => { } const get = new Promise((res, rej) => { - redis.get(userToken, async (_, twCtx) => { + redisClient.get(userToken, async (_, twCtx) => { res(twCtx); }); }); -- cgit v1.2.3-freya