summaryrefslogtreecommitdiff
path: root/src/server/api/service/github.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-03-23 14:54:09 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-03-23 14:54:09 +0900
commit5c3a56b2832ac625552a7d261cd38fb118d813f4 (patch)
tree7c75feb50b58a6d2b59b2b43c5c74c6dc98ad1ce /src/server/api/service/github.ts
parentperf(server): Redis接続をストリーミング接続ごとに作らず、... (diff)
downloadsharkey-5c3a56b2832ac625552a7d261cd38fb118d813f4.tar.gz
sharkey-5c3a56b2832ac625552a7d261cd38fb118d813f4.tar.bz2
sharkey-5c3a56b2832ac625552a7d261cd38fb118d813f4.zip
fix bug
https://github.com/syuilo/misskey/commit/48ea805999c6cb8e900aeaec6edaf68788bd51e0#commitcomment-48584326
Diffstat (limited to 'src/server/api/service/github.ts')
-rw-r--r--src/server/api/service/github.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/api/service/github.ts b/src/server/api/service/github.ts
index 2b10fa02a0..7ca95fc112 100644
--- a/src/server/api/service/github.ts
+++ b/src/server/api/service/github.ts
@@ -4,7 +4,7 @@ import { getJson } from '../../../misc/fetch';
import { OAuth2 } from 'oauth';
import config from '../../../config';
import { publishMainStream } from '../../../services/stream';
-import redis from '../../../db/redis';
+import { redisClient } from '../../../db/redis';
import { v4 as uuid } from 'uuid';
import signin from '../common/signin';
import { fetchMeta } from '../../../misc/fetch-meta';
@@ -95,7 +95,7 @@ router.get('/connect/github', async ctx => {
state: uuid()
};
- redis.set(userToken, JSON.stringify(params));
+ redisClient.set(userToken, JSON.stringify(params));
const oauth2 = await getOath2();
ctx.redirect(oauth2!.getAuthorizeUrl(params));
@@ -116,7 +116,7 @@ router.get('/signin/github', async ctx => {
httpOnly: true
});
- redis.set(sessid, JSON.stringify(params));
+ redisClient.set(sessid, JSON.stringify(params));
const oauth2 = await getOath2();
ctx.redirect(oauth2!.getAuthorizeUrl(params));
@@ -143,7 +143,7 @@ router.get('/gh/cb', async ctx => {
}
const { redirect_uri, state } = await new Promise<any>((res, rej) => {
- redis.get(sessid, async (_, state) => {
+ redisClient.get(sessid, async (_, state) => {
res(JSON.parse(state));
});
});
@@ -194,7 +194,7 @@ router.get('/gh/cb', async ctx => {
}
const { redirect_uri, state } = await new Promise<any>((res, rej) => {
- redis.get(userToken, async (_, state) => {
+ redisClient.get(userToken, async (_, state) => {
res(JSON.parse(state));
});
});