mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
migrate-hust: remove deprecated usage
This commit is contained in:
1 parent
37822f0025
commit
fe340492b5
2 files changed
+5
-6
No files matched your search
@@ -1,6 +1,5 @@
|
||||
import { } from 'hydrooj';
|
||||
import { md5, sha1 } from 'hydrooj/src/lib/crypto';
|
||||
|
||||
const { md5, sha1 } = global.Hydro.lib;
|
||||
const RE_MD5 = /^[\da-fA-F]{32}$/;
|
||||
|
||||
function hash(password: string, stored: string) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* eslint-disable no-tabs */
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import mysql from 'mysql';
|
||||
import 'hydrooj';
|
||||
import { buildContent } from 'hydrooj/src/lib/content';
|
||||
|
||||
const { user, problem, system } = global.Hydro.model;
|
||||
import user from 'hydrooj/src/model/user';
|
||||
import problem from 'hydrooj/src/model/problem';
|
||||
import * as system from 'hydrooj/src/model/system';
|
||||
|
||||
export async function run({
|
||||
host = 'localhost', port = 27017, name = 'vijos4', username, password,
|
||||
@@ -93,7 +93,7 @@ export async function run({
|
||||
samples: [[pdoc.sample_input, pdoc.sample_output]],
|
||||
hint: pdoc.hint,
|
||||
source: pdoc.source,
|
||||
}, 'html'),
|
||||
}),
|
||||
1, pdoc.source.split(' '), pdoc.defunct === 'Y',
|
||||
);
|
||||
const [cdoc] = await query(`SELECT * FROM 'privilege' WHERE rightstr = 'p${pdoc.problem_id}'`);
|
||||
|
||||
Reference in new issue
Block a user