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.`);
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ function config(testingMode: boolean = false): Options {
|
|||
password: getEnvVar(EnvVars.DbPassword),
|
||||
entities: entities,
|
||||
persistOnCreate: false, // Entities should not be implicitly persisted when calling create(...), but only after
|
||||
// they were saved explicitly.
|
||||
// They were saved explicitly.
|
||||
// EntitiesTs: entitiesTs,
|
||||
|
||||
// Logging
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue