mirror of
https://github.com/certd/certd.git
synced 2026-04-24 20:57:26 +08:00
perf: 登录支持极验验证码
This commit is contained in:
@@ -12,7 +12,7 @@ export class AddonEntity {
|
||||
name: string;
|
||||
|
||||
|
||||
@Column({ comment: 'addon类型', length: 100 })
|
||||
@Column({ name: 'addon_type', comment: 'addon类型', length: 100 })
|
||||
addonType: string;
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,11 @@ export class AddonService extends BaseService<AddonEntity> {
|
||||
throw new ValidateException('您无权查看该Addon配置');
|
||||
}
|
||||
}
|
||||
if (!param.userId){
|
||||
param.isSystem = true
|
||||
}else{
|
||||
param.isSystem = false
|
||||
}
|
||||
delete param._copyFrom
|
||||
return await super.add(param);
|
||||
}
|
||||
@@ -65,6 +70,8 @@ export class AddonService extends BaseService<AddonEntity> {
|
||||
id: entity.id,
|
||||
name: entity.name,
|
||||
userId: entity.userId,
|
||||
addonType: entity.addonType,
|
||||
type: entity.type,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -197,7 +204,7 @@ export class AddonService extends BaseService<AddonEntity> {
|
||||
|
||||
const addonDefine = this.getDefineByType( type,addonType)
|
||||
|
||||
const defaultConfig = await this.getDefault(userId);
|
||||
const defaultConfig = await this.getDefault(userId,addonType);
|
||||
if (defaultConfig) {
|
||||
return defaultConfig;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user