mirror of
https://github.com/certd/certd.git
synced 2026-07-05 19:37:34 +08:00
perf: 支持全自动匹配部署宝塔网站证书
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ export class CertInfoWildcardDomainCountFix {
|
||||
},
|
||||
});
|
||||
let fixedCount = 0;
|
||||
for (const item of list) {
|
||||
for (const item of list as any[]) {
|
||||
if (!item.domains) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ export class CommonEabToAcmeAccountFix {
|
||||
return null;
|
||||
}
|
||||
const email = eabAccess.email || `${caType}@common.certd.local`;
|
||||
const exists = await this.accessService.findOne({
|
||||
const exists: any = await this.accessService.findOne({
|
||||
where: {
|
||||
userId: 0,
|
||||
projectId: null,
|
||||
|
||||
@@ -36,7 +36,7 @@ export class RoleService extends BaseService<RoleEntity> {
|
||||
}
|
||||
|
||||
async getRoleIdsByUserId(id: any) {
|
||||
const userRoles = await this.userRoleService.find({
|
||||
const userRoles: any = await this.userRoleService.find({
|
||||
where: { userId: id },
|
||||
});
|
||||
return userRoles.map(item => item.roleId);
|
||||
@@ -131,7 +131,7 @@ export class RoleService extends BaseService<RoleEntity> {
|
||||
async delete(id: any) {
|
||||
const idArr = this.resolveIdArr(id);
|
||||
//@ts-ignore
|
||||
const urs = await this.userRoleService.find({ where: { roleId: In(idArr) } });
|
||||
const urs:any = await this.userRoleService.find({ where: { roleId: In(idArr) } });
|
||||
if (urs.length > 0) {
|
||||
throw new Error("该角色已被用户使用,无法删除");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user