mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "3.1.1",
|
"version": "3.1.2",
|
||||||
"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",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "4.2.3",
|
"version": "4.2.4",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/plugin-api",
|
"main": "src/plugin-api",
|
||||||
"module": "src/plugin-api",
|
"module": "src/plugin-api",
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export default class RecordModel {
|
|||||||
source = `${pdoc.domainId}/${pdoc.docId}`;
|
source = `${pdoc.domainId}/${pdoc.docId}`;
|
||||||
data = pdoc.data;
|
data = pdoc.data;
|
||||||
if (typeof pdoc.config === 'string') throw new Error(pdoc.config);
|
if (typeof pdoc.config === 'string') throw new Error(pdoc.config);
|
||||||
if (pdoc.config.type === 'remote_judge') {
|
if (pdoc.config.type === 'remote_judge' && rdoc.contest?.toHexString() !== '0'.repeat(24)) {
|
||||||
await task.deleteMany({ rid: { $in: rids } });
|
await task.deleteMany({ rid: { $in: rids } });
|
||||||
return await task.addMany(rids.map((rid) => ({
|
return await task.addMany(rids.map((rid) => ({
|
||||||
...(pdoc.config as any),
|
...(pdoc.config as any),
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export function Media(md: MarkdownIt) {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
if (service === 'pdf') {
|
if (service === 'pdf') {
|
||||||
if (src.startsWith('file://')) src += src.includes('?') ? '&noDisposition=1' : '?noDisposition=1';
|
if (src.startsWith('file://') || src.startsWith('./')) src += src.includes('?') ? '&noDisposition=1' : '?noDisposition=1';
|
||||||
return `\
|
return `\
|
||||||
<object classid="clsid:${randomUUID().toUpperCase()}">
|
<object classid="clsid:${randomUUID().toUpperCase()}">
|
||||||
<param name="SRC" value="${src}" >
|
<param name="SRC" value="${src}" >
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/vjudge",
|
"name": "@hydrooj/vjudge",
|
||||||
"version": "1.6.2",
|
"version": "1.6.3",
|
||||||
"description": "Submit problems to remote oj",
|
"description": "Submit problems to remote oj",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const UA = [
|
|||||||
export default class LuoguProvider implements IBasicProvider {
|
export default class LuoguProvider implements IBasicProvider {
|
||||||
constructor(public account: RemoteAccount, private save: (data: any) => Promise<void>) {
|
constructor(public account: RemoteAccount, private save: (data: any) => Promise<void>) {
|
||||||
if (account.cookie) this.cookie = account.cookie;
|
if (account.cookie) this.cookie = account.cookie;
|
||||||
setInterval(() => this.getCsrfToken('/'), 5 * 60 * 1000);
|
setInterval(() => this.getCsrfToken('/user/setting'), 5 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
cookie: string[] = [];
|
cookie: string[] = [];
|
||||||
@@ -78,7 +78,7 @@ export default class LuoguProvider implements IBasicProvider {
|
|||||||
|
|
||||||
async ensureLogin() {
|
async ensureLogin() {
|
||||||
if (await this.loggedIn) {
|
if (await this.loggedIn) {
|
||||||
await this.getCsrfToken('/');
|
await this.getCsrfToken('/user/setting');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
logger.info('retry login');
|
logger.info('retry login');
|
||||||
|
|||||||
Reference in new issue
Block a user