Skip to content

Commit

Permalink
fix: function naming
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenComp committed Nov 5, 2023
1 parent cb91dc4 commit 52b028d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/back/src/jobs/back-jobs.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class BackJobsService {

async toggleWorkflow(params: WorkflowToggleParams, newState: boolean) {
const jobName = `area-${newState ? "enable" : "disable"}-workflow`;
const workflow = await this.workflowsService.getWorkflowIdByName(params.workflowName, params.ownerId);
const workflow = await this.workflowsService.getWorkflowByNameAndOwner(params.workflowName, params.ownerId);

if (workflow.active === newState) return;
try {
Expand Down
2 changes: 1 addition & 1 deletion backend/back/src/workflows/workflows.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class WorkflowsService {
private readonly servicesService: ServicesService,
) {}

async getWorkflowIdByName(name: string, ownerId: string) {
async getWorkflowByNameAndOwner(name: string, ownerId: string) {
return this.workflowRepository.findOneBy({
name,
ownerId,
Expand Down

0 comments on commit 52b028d

Please sign in to comment.