perf: 支持重置管理员密码,忘记密码的补救方案

This commit is contained in:
xiaojunnuo
2024-06-16 02:06:44 +08:00
parent 5d2d0955b1
commit 732cbc5e92
8 changed files with 97 additions and 13 deletions
@@ -1,9 +1,5 @@
import { Config, Provide } from '@midwayjs/decorator';
import {
IMidwayKoaContext,
NextFunction,
IWebMiddleware,
} from '@midwayjs/koa';
import { IMidwayKoaContext, NextFunction, IWebMiddleware } from '@midwayjs/koa';
import { PreviewException } from '../basic/exception/preview-exception';
/**
@@ -20,6 +16,7 @@ export class PreviewMiddleware implements IWebMiddleware {
await next();
return;
}
// eslint-disable-next-line prefer-const
let { url, request } = ctx;
const body: any = request.body;
let id = body.id || request.query.id;