mirror of
https://github.com/certd/certd.git
synced 2026-05-01 02:17:27 +08:00
chore:
This commit is contained in:
@@ -321,7 +321,7 @@ cert.jks:jks格式证书文件,java服务器使用
|
|||||||
// 检查有效期
|
// 检查有效期
|
||||||
const leftDays = dayjs(expires).diff(dayjs(), "day");
|
const leftDays = dayjs(expires).diff(dayjs(), "day");
|
||||||
return {
|
return {
|
||||||
isWillExpire: leftDays < maxDays,
|
isWillExpire: leftDays <= maxDays,
|
||||||
leftDays,
|
leftDays,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,4 +59,13 @@ export class CertInfoService extends BaseService<CertInfoEntity> {
|
|||||||
|
|
||||||
await this.addOrUpdate(bean);
|
await this.addOrUpdate(bean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async deleteByPipelineId(id: number) {
|
||||||
|
if (!id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await this.repository.delete({
|
||||||
|
pipelineId: id,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -348,6 +348,7 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
|||||||
await super.delete([id]);
|
await super.delete([id]);
|
||||||
await this.historyService.deleteByPipelineId(id);
|
await this.historyService.deleteByPipelineId(id);
|
||||||
await this.historyLogService.deleteByPipelineId(id);
|
await this.historyLogService.deleteByPipelineId(id);
|
||||||
|
await this.certInfoService.deleteByPipelineId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clearTriggers(id: number) {
|
async clearTriggers(id: number) {
|
||||||
|
|||||||
Reference in New Issue
Block a user