修复oauth.google setting字段异常问题,将__mock__添加至ignore

This commit is contained in:
undefined committed 2020-09-07 22:55:18 +08:00
1 parent 147637d539
commit 6ba93841ea
17 files changed
+103 -16

No files matched your search

+9 -1
View File
@@ -4,6 +4,14 @@ import proxy from 'superagent-proxy';
proxy(superagent);
declare module 'hydrooj' {
interface SystemKeys {
'login-with-google.id': string,
'login-with-google.secret': string,
'login-with-google.proxy': string,
}
}
async function get() {
const { system, token } = global.Hydro.model;
const [appid, url, [state]] = await Promise.all([
@@ -26,7 +34,7 @@ async function callback({
s,
] = await Promise.all([
system.getMany([
'login-with-google.id', 'oauth.googlesecret', 'server.url', 'proxy',
'login-with-google.id', 'login-with-google.secret', 'server.url', 'login-with-google.proxy',
]),
token.get(state, token.TYPE_OAUTH),
]);