style: fix linting issues met Prettier
This commit is contained in:
parent
b963101f62
commit
34facfe7c8
12 changed files with 70 additions and 72 deletions
|
@ -1,5 +1,5 @@
|
|||
import { EntityDTO, FromEntityType } from "@mikro-orm/core";
|
||||
import { DwengoEntityRepository } from "../data/dwengo-entity-repository";
|
||||
import { EntityDTO, FromEntityType } from '@mikro-orm/core';
|
||||
import { DwengoEntityRepository } from '../data/dwengo-entity-repository';
|
||||
|
||||
/**
|
||||
* Utility function to perform an PUT on an object.
|
||||
|
@ -7,14 +7,14 @@ import { DwengoEntityRepository } from "../data/dwengo-entity-repository";
|
|||
* @param object The object that needs to be changed
|
||||
* @param data The datafields and their values that will be updated
|
||||
* @param repo The repository on which this action needs to be performed
|
||||
*
|
||||
*
|
||||
* @returns Nothing.
|
||||
*/
|
||||
export async function putObject<T extends object, DTO>(
|
||||
object: T,
|
||||
data: Partial<EntityDTO<FromEntityType<T>>>,
|
||||
object: T,
|
||||
data: Partial<EntityDTO<FromEntityType<T>>>,
|
||||
repo: DwengoEntityRepository<T>
|
||||
): Promise<void> {
|
||||
repo.assign(object, data);
|
||||
await repo.getEntityManager().flush();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue