mirror of
https://github.com/certd/certd.git
synced 2026-06-24 19:47:34 +08:00
perf: 支持passkey登录
This commit is contained in:
@@ -25,6 +25,7 @@ export const AdminRoleId = 1
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class UserService extends BaseService<UserEntity> {
|
||||
|
||||
|
||||
@InjectEntityModel(UserEntity)
|
||||
repository: Repository<UserEntity>;
|
||||
@@ -278,6 +279,10 @@ export class UserService extends BaseService<UserEntity> {
|
||||
return user.username;
|
||||
}
|
||||
|
||||
async getByUsername(username: any) {
|
||||
return await this.findOne({ username });
|
||||
}
|
||||
|
||||
async changePassword(userId: any, form: any) {
|
||||
const user = await this.info(userId);
|
||||
const passwordChecked = await this.checkPassword(form.password, user.password, user.passwordVersion);
|
||||
|
||||
Reference in New Issue
Block a user