refactor(core): Move methods from WorkflowHelpers into various workflow services (no-changelog) (#8348)
This commit is contained in:
committed by
GitHub
parent
ab52aaf7e9
commit
7cdbb424e3
@@ -11,6 +11,15 @@ export class WorkflowStaticDataService {
|
||||
private readonly workflowRepository: WorkflowRepository,
|
||||
) {}
|
||||
|
||||
/** Returns the static data of workflow */
|
||||
async getStaticDataById(workflowId: string) {
|
||||
const workflowData = await this.workflowRepository.findOne({
|
||||
select: ['staticData'],
|
||||
where: { id: workflowId },
|
||||
});
|
||||
return workflowData?.staticData ?? {};
|
||||
}
|
||||
|
||||
/** Saves the static data if it changed */
|
||||
async saveStaticData(workflow: Workflow): Promise<void> {
|
||||
if (workflow.staticData.__dataChanged === true) {
|
||||
|
||||
Reference in New Issue
Block a user