mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
perf: 模版导入流水线
This commit is contained in:
@@ -48,10 +48,10 @@ export class TemplateService extends BaseService<TemplateEntity> {
|
||||
newPipeline.title = template.title + "模版流水线"
|
||||
newPipeline.templateId = template.id
|
||||
newPipeline.isTemplate = true
|
||||
newPipeline.userId = template.userId
|
||||
|
||||
const pipelineJson: Pipeline = JSON.parse(newPipeline.content)
|
||||
delete pipelineJson.triggers
|
||||
pipelineJson.id = template.id
|
||||
pipelineJson.userId = template.userId
|
||||
pipelineJson.title = newPipeline.title
|
||||
newPipeline.content = JSON.stringify(pipelineJson)
|
||||
@@ -121,6 +121,8 @@ export class TemplateService extends BaseService<TemplateEntity> {
|
||||
}
|
||||
|
||||
await this.pipelineService.save(newPipeline)
|
||||
|
||||
return newPipeline
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user