From 71ab562592287a39c0017c3bee8642edbd5cea8c Mon Sep 17 00:00:00 2001 From: undefined Date: Fri, 24 Jul 2020 18:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hydro/entry/common.ts | 7 ++++--- hydro/handler/home.ts | 4 ++-- hydro/model/document.ts | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hydro/entry/common.ts b/hydro/entry/common.ts index 498d1dc67..266b2d04c 100644 --- a/hydro/entry/common.ts +++ b/hydro/entry/common.ts @@ -8,7 +8,7 @@ export const builtinLib = [ 'jwt', 'download', 'i18n', 'mail', 'markdown', 'md5', 'misc', 'paginate', 'hash.hydro', 'rank', 'template', 'validator', 'nav', 'sysinfo', 'testdata.convert.ini', - 'readConfig', 'logger', 'useragent', + 'testdataConfig', 'logger', 'useragent', ]; export const builtinModel = [ @@ -25,8 +25,9 @@ export const builtinHandler = [ ]; export const builtinScript = [ - 'install', 'rating', 'register', 'problemStat', 'blacklist', - 'setSuperadmin', 'deleteUser', + 'rating', 'register', 'problemStat', 'blacklist', 'setSuperadmin', + 'deleteUser', + 'upgrade0_1', ]; function getFiles(folder: string, base = ''): string[] { diff --git a/hydro/handler/home.ts b/hydro/handler/home.ts index 4a7f3430a..84c94cc48 100644 --- a/hydro/handler/home.ts +++ b/hydro/handler/home.ts @@ -140,8 +140,8 @@ class HomeSecurityHandler extends Handler { @param('current', Types.String) @param('password', Types.String, isPassword) @param('verifyPassword', Types.String) - async postChangePassword(current: string, password: string, verifyPassword: string) { - if (password !== verifyPassword) throw new VerifyPasswordError(); + async postChangePassword(_: string, current: string, password: string, verify: string) { + if (password !== verify) throw new VerifyPasswordError(); this.user.checkPassword(current); await user.setPassword(this.user._id, password); this.back(); diff --git a/hydro/model/document.ts b/hydro/model/document.ts index 4d94b0a62..298baaf5d 100644 --- a/hydro/model/document.ts +++ b/hydro/model/document.ts @@ -18,12 +18,12 @@ export const TYPE_TRAINING = 40; export const TYPE_FILE = 50; export const TYPE_HOMEWORK = 60; -export async function add( +export async function add( domainId: string, content: string, owner: number, - docType: number, docId: DocID, + docType: number, docId: T, parentType?: number | null, parentId?: DocID, args?: any, -): Promise +): Promise export async function add( domainId: string, content: string, owner: number, docType: number, docId: null,