perf: 支持passkey登录

This commit is contained in:
xiaojunnuo
2026-03-12 18:11:02 +08:00
parent 2c399a078e
commit 10b7644bb7
22 changed files with 1222 additions and 246 deletions
@@ -4,6 +4,7 @@ import { In } from 'typeorm';
import { AuthService } from '../../../modules/sys/authority/service/auth-service.js';
import { UserService } from '../../../modules/sys/authority/service/user-service.js';
import { BasicController } from '../../basic/code-controller.js';
import { RoleService } from '../../../modules/sys/authority/service/role-service.js';
/**
* 通知
@@ -15,6 +16,8 @@ export class BasicUserController extends BasicController {
service: UserService;
@Inject()
authService: AuthService;
@Inject()
roleService: RoleService;
getService(): UserService {
return this.service;
@@ -57,4 +60,15 @@ export class BasicUserController extends BasicController {
return this.ok(users);
}
@Post('/getSimpleRoles', {summary: Constants.per.authOnly})
async getSimpleRoles() {
const roles = await this.roleService.find({
select: {
id: true,
name: true,
},
});
return this.ok(roles);
}
}