style: fix linting issues met ESLint
This commit is contained in:
parent
d49e32a241
commit
56d34adbc0
3 changed files with 6 additions and 10 deletions
|
@ -2,7 +2,7 @@ import {EntityRepository, FilterQuery} from '@mikro-orm/core';
|
|||
import {EntityAlreadyExistsException} from "../exceptions/entity-already-exists-exception";
|
||||
|
||||
export abstract class DwengoEntityRepository<T extends object> extends EntityRepository<T> {
|
||||
public async save(entity: T, options?: {preventOverwrite?: Boolean}): Promise<void> {
|
||||
public async save(entity: T, options?: {preventOverwrite?: boolean}): Promise<void> {
|
||||
if (options?.preventOverwrite && await this.findOne(entity)) {
|
||||
throw new EntityAlreadyExistsException(`A ${this.getEntityName()} with this identifier already exists.`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue