mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
修复oauth.google setting字段异常问题,将__mock__添加至ignore
This commit is contained in:
1 parent
147637d539
commit
6ba93841ea
17 files changed
+103
-16
No files matched your search
@@ -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),
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user