Merge pull request #74 from Youmoo/fix/typo
This commit is contained in:
@@ -8,12 +8,12 @@
|
||||
"scripts": {
|
||||
"prebuild": "rimraf dist",
|
||||
"build": "nest build",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
|
||||
"start": "nest start",
|
||||
"start:dev": "nest start --watch",
|
||||
"start:debug": "nest start --debug --watch",
|
||||
"start:prod": "node dist/main",
|
||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||
"lint": "eslint \"{src,apps,libs,tests}/**/*.ts\" --fix",
|
||||
"test": "jest --config .jestrc.json",
|
||||
"test:watch": "jest --watch",
|
||||
"test:cov": "jest --coverage",
|
||||
|
||||
@@ -84,8 +84,8 @@ export abstract class SqlRepositoryBase<
|
||||
|
||||
this.logger.debug(
|
||||
`[${RequestContextService.getRequestId()}] deleting entities ${
|
||||
(entity.id, this.tableName)
|
||||
}`,
|
||||
entity.id
|
||||
} from ${this.tableName}`,
|
||||
);
|
||||
|
||||
const result = await this.pool.query(query);
|
||||
@@ -102,7 +102,7 @@ export abstract class SqlRepositoryBase<
|
||||
async insert(entity: Aggregate | Aggregate[]): Promise<void> {
|
||||
const entities = Array.isArray(entity) ? entity : [entity];
|
||||
|
||||
const records = entities.map(this.mapper.toPersistance);
|
||||
const records = entities.map(this.mapper.toPersistence);
|
||||
|
||||
const query = this.generateInsertQuery(records);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ export interface Mapper<
|
||||
DbRecord,
|
||||
Response = any,
|
||||
> {
|
||||
toPersistance(entity: DomainEntity): DbRecord;
|
||||
toPersistence(entity: DomainEntity): DbRecord;
|
||||
toDomain(record: any): DomainEntity;
|
||||
toResponse(entity: DomainEntity): Response;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Injectable } from '@nestjs/common';
|
||||
export class UserMapper
|
||||
implements Mapper<UserEntity, UserModel, UserResponseDto>
|
||||
{
|
||||
toPersistance(entity: UserEntity): UserModel {
|
||||
toPersistence(entity: UserEntity): UserModel {
|
||||
const copy = entity.getPropsCopy();
|
||||
const record: UserModel = {
|
||||
id: copy.id,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { WalletModel, walletSchema } from './database/wallet.repository';
|
||||
|
||||
@Injectable()
|
||||
export class WalletMapper implements Mapper<WalletEntity, WalletModel> {
|
||||
toPersistance(entity: WalletEntity): WalletModel {
|
||||
toPersistence(entity: WalletEntity): WalletModel {
|
||||
const copy = entity.getPropsCopy();
|
||||
const record: WalletModel = {
|
||||
id: copy.id,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { CreateUserTestContext } from '@tests/user/user-shared-steps';
|
||||
import { DefineStepFunction } from 'jest-cucumber';
|
||||
|
||||
/**
|
||||
* Test steps that an be shared between all tests
|
||||
* Test steps that can be shared between all tests
|
||||
*/
|
||||
|
||||
export const iReceiveAnErrorWithStatusCode = (
|
||||
|
||||
Reference in New Issue
Block a user