Skip to content

Commit

Permalink
fix: added missing await/async
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-rocket committed Apr 11, 2024
1 parent f446926 commit 5cc5679
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/server/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
"node16-win-x64"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { MikroOrmEmployeeProposalTemplateRepository, TypeOrmEmployeeProposalTemp
@Injectable()
export class EmployeeProposalTemplateService extends TenantAwareCrudService<EmployeeProposalTemplate> {
constructor(
typeOrmEmployeeProposalTemplateRepository: TypeOrmEmployeeProposalTemplateRepository,
mikroOrmEmployeeProposalTemplateRepository: MikroOrmEmployeeProposalTemplateRepository
readonly typeOrmEmployeeProposalTemplateRepository: TypeOrmEmployeeProposalTemplateRepository,
readonly mikroOrmEmployeeProposalTemplateRepository: MikroOrmEmployeeProposalTemplateRepository
) {
super(typeOrmEmployeeProposalTemplateRepository, mikroOrmEmployeeProposalTemplateRepository);
}
Expand All @@ -20,7 +20,7 @@ export class EmployeeProposalTemplateService extends TenantAwareCrudService<Empl
* @returns The updated proposal template.
*/
async makeDefault(id: IEmployeeProposalTemplate['id']): Promise<IEmployeeProposalTemplate> {
const proposalTemplate = await this.findOneByIdString(id);
const proposalTemplate: IEmployeeProposalTemplate = await this.findOneByIdString(id);
proposalTemplate.isDefault = !proposalTemplate.isDefault;

const { organizationId, tenantId, employeeId } = proposalTemplate;
Expand All @@ -29,7 +29,7 @@ export class EmployeeProposalTemplateService extends TenantAwareCrudService<Empl
isDefault: false
});

return super.save(proposalTemplate);
return await super.save(proposalTemplate);
}

/**
Expand All @@ -39,6 +39,6 @@ export class EmployeeProposalTemplateService extends TenantAwareCrudService<Empl
* @returns The list of proposal templates.
*/
async findAll(params?: PaginationParams<IEmployeeProposalTemplate>) {
return super.findAll(params);
return await super.findAll(params);
}
}

0 comments on commit 5cc5679

Please sign in to comment.