vjudge: support multiple debug host

This commit is contained in:
undefined committed 2024-11-24 18:11:18 +08:00
1 parent eba7401284
commit 65f6153d13
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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)) {
+1 -1
View File
@@ -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() {