mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
vjudge: support multiple debug host
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -185,7 +185,7 @@ class VJudgeService extends Service {
|
||||
}
|
||||
|
||||
addProvider(type: string, provider: BasicProvider, override = false) {
|
||||
if (process.env.VJUDGE_DEBUG && process.env.VJUDGE_DEBUG !== type) return;
|
||||
if (process.env.VJUDGE_DEBUG && !(`,${process.env.VJUDGE_DEBUG},`).includes(`,${type},`)) return;
|
||||
if (!override && this.providers[type]) throw new Error(`duplicate provider ${type}`);
|
||||
this.providers[type] = provider;
|
||||
for (const account of this.accounts.filter((a) => a.type === type)) {
|
||||
|
||||
@@ -39,7 +39,7 @@ export default class UOJProvider extends BasicFetcher implements IBasicProvider
|
||||
}
|
||||
|
||||
get loggedIn() {
|
||||
return this.get('/login').then(({ text: html }) => !html.includes('<title>登录 - Universal Online Judge</title>'));
|
||||
return this.get('/login').then(({ text: html }) => !html.includes('<title>登录 - '));
|
||||
}
|
||||
|
||||
async ensureLogin() {
|
||||
|
||||
Reference in new issue
Block a user