mirror of
https://github.com/certd/certd.git
synced 2026-07-14 09:27:32 +08:00
chore: 1
This commit is contained in:
@@ -805,11 +805,12 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
||||
});
|
||||
}
|
||||
|
||||
async batchDelete(ids: number[], userId: number, projectId?: number): Promise<void> {
|
||||
async batchDelete(ids: number[], userId: number, projectId?: number): Promise<number> {
|
||||
const userProjectQuery = this.buildUserProjectQuery(userId, projectId);
|
||||
await this.repository.delete({
|
||||
id: In(ids),
|
||||
...userProjectQuery,
|
||||
});
|
||||
return ids.length;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ export class TemplateService extends BaseService<TemplateEntity> {
|
||||
};
|
||||
}
|
||||
|
||||
async batchDelete(ids: number[], userId: number, projectId?: number) {
|
||||
async batchDelete(ids: number[], userId: number, projectId?: number): Promise<number> {
|
||||
const where: any = {
|
||||
id: In(ids),
|
||||
};
|
||||
@@ -102,6 +102,7 @@ export class TemplateService extends BaseService<TemplateEntity> {
|
||||
const pipelineIds = list.map(item => item.pipelineId);
|
||||
await this.delete(ids);
|
||||
await this.pipelineService.batchDelete(pipelineIds, userId, projectId);
|
||||
return ids.length;
|
||||
}
|
||||
|
||||
async createPipelineByTemplate(body: PipelineEntity) {
|
||||
|
||||
Reference in New Issue
Block a user