mirror of
https://github.com/certd/certd.git
synced 2026-04-16 05:50:50 +08:00
perf: 首页新增修改密码提示
This commit is contained in:
@@ -16,6 +16,11 @@ export class MineController extends BaseController {
|
||||
public async info() {
|
||||
const userId = this.getUserId();
|
||||
const user = await this.userService.info(userId);
|
||||
const isWeak = await this.userService.checkPassword('123456', user.password, user.passwordVersion);
|
||||
if (isWeak) {
|
||||
//@ts-ignore
|
||||
user.isWeak = true;
|
||||
}
|
||||
user.roleIds = await this.roleService.getRoleIdsByUserId(userId);
|
||||
delete user.password;
|
||||
return this.ok(user);
|
||||
|
||||
@@ -79,12 +79,7 @@ export class RoleController extends CrudController<RoleService> {
|
||||
* @param permissionIds
|
||||
*/
|
||||
@Post('/authz', { summary: 'sys:auth:role:edit' })
|
||||
async authz(
|
||||
@Body('roleId')
|
||||
roleId,
|
||||
@Body('permissionIds')
|
||||
permissionIds
|
||||
) {
|
||||
async authz(@Body('roleId') roleId, @Body('permissionIds') permissionIds) {
|
||||
await this.service.authz(roleId, permissionIds);
|
||||
return this.ok(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user