mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
bug fix
This commit is contained in:
1 parent
c2f63c80e1
commit
e027b74f2d
6 files changed
+7
-7
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/vjudge",
|
||||
"version": "1.6.2",
|
||||
"version": "1.6.3",
|
||||
"description": "Submit problems to remote oj",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -36,7 +36,7 @@ const UA = [
|
||||
export default class LuoguProvider implements IBasicProvider {
|
||||
constructor(public account: RemoteAccount, private save: (data: any) => Promise<void>) {
|
||||
if (account.cookie) this.cookie = account.cookie;
|
||||
setInterval(() => this.getCsrfToken('/'), 5 * 60 * 1000);
|
||||
setInterval(() => this.getCsrfToken('/user/setting'), 5 * 60 * 1000);
|
||||
}
|
||||
|
||||
cookie: string[] = [];
|
||||
@@ -78,7 +78,7 @@ export default class LuoguProvider implements IBasicProvider {
|
||||
|
||||
async ensureLogin() {
|
||||
if (await this.loggedIn) {
|
||||
await this.getCsrfToken('/');
|
||||
await this.getCsrfToken('/user/setting');
|
||||
return true;
|
||||
}
|
||||
logger.info('retry login');
|
||||
|
||||
Reference in new issue
Block a user