更新索引

This commit is contained in:
undefined committed 2020-07-24 18:51:32 +08:00
1 parent 55754b2e20
commit 71ab562592
3 files changed
+9 -8

No files matched your search

+4 -3
View File
@@ -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[] {
+2 -2
View File
@@ -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();
+3 -3
View File
@@ -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<T extends DocID>(
domainId: string, content: string, owner: number,
docType: number, docId: DocID,
docType: number, docId: T,
parentType?: number | null, parentId?: DocID,
args?: any,
): Promise<typeof docId>
): Promise<T>
export async function add(
domainId: string, content: string, owner: number,
docType: number, docId: null,