mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: fix
This commit is contained in:
1 parent
3bcfec0366
commit
72053d7a37
2 files changed
+4
-2
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.10.13",
|
"version": "2.10.14",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -328,7 +328,9 @@ export default class Hydro {
|
|||||||
|
|
||||||
async ensureLogin() {
|
async ensureLogin() {
|
||||||
try {
|
try {
|
||||||
await this.axios.get('judge/files');
|
const res = await this.axios.get('judge/files');
|
||||||
|
// Redirected to /login
|
||||||
|
if (res.data.url) await this.login();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await this.login();
|
await this.login();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user