From 2a2cfa5c0f72c27d0dd4e812ba0a2ff0ab0b94fe Mon Sep 17 00:00:00 2001 From: sbriat Date: Fri, 5 May 2023 08:56:25 +0200 Subject: [PATCH] wip --- src/modules/ad/adapters/secondaries/ad.repository.ts | 4 ++-- .../adapters/secondaries/prisma-repository.abstract.ts | 0 .../{src => }/adapters/secondaries/prisma-service.ts | 0 src/modules/database/database.module.ts | 2 +- src/modules/database/{src => }/domain/matcher-repository.ts | 0 src/modules/database/{src => }/domain/point.type.ts | 0 .../database/{src => }/exceptions/database.exception.ts | 0 .../database/{src => }/interfaces/collection.interface.ts | 0 .../database/{src => }/interfaces/repository.interface.ts | 0 src/modules/database/tests/unit/prisma-repository.spec.ts | 6 +++--- .../matcher/adapters/primaries/matcher.controller.ts | 4 ++-- 11 files changed, 8 insertions(+), 8 deletions(-) rename src/modules/database/{src => }/adapters/secondaries/prisma-repository.abstract.ts (100%) rename src/modules/database/{src => }/adapters/secondaries/prisma-service.ts (100%) rename src/modules/database/{src => }/domain/matcher-repository.ts (100%) rename src/modules/database/{src => }/domain/point.type.ts (100%) rename src/modules/database/{src => }/exceptions/database.exception.ts (100%) rename src/modules/database/{src => }/interfaces/collection.interface.ts (100%) rename src/modules/database/{src => }/interfaces/repository.interface.ts (100%) diff --git a/src/modules/ad/adapters/secondaries/ad.repository.ts b/src/modules/ad/adapters/secondaries/ad.repository.ts index b100584..a57910a 100644 --- a/src/modules/ad/adapters/secondaries/ad.repository.ts +++ b/src/modules/ad/adapters/secondaries/ad.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; -import { MatcherRepository } from '../../../database/src/domain/matcher-repository'; +import { MatcherRepository } from '../../../database/domain/matcher-repository'; import { Ad } from '../../domain/entities/ad'; -import { DatabaseException } from '../../../database/src/exceptions/database.exception'; +import { DatabaseException } from '../../../database/exceptions/database.exception'; @Injectable() export class AdRepository extends MatcherRepository { diff --git a/src/modules/database/src/adapters/secondaries/prisma-repository.abstract.ts b/src/modules/database/adapters/secondaries/prisma-repository.abstract.ts similarity index 100% rename from src/modules/database/src/adapters/secondaries/prisma-repository.abstract.ts rename to src/modules/database/adapters/secondaries/prisma-repository.abstract.ts diff --git a/src/modules/database/src/adapters/secondaries/prisma-service.ts b/src/modules/database/adapters/secondaries/prisma-service.ts similarity index 100% rename from src/modules/database/src/adapters/secondaries/prisma-service.ts rename to src/modules/database/adapters/secondaries/prisma-service.ts diff --git a/src/modules/database/database.module.ts b/src/modules/database/database.module.ts index 2d18636..5b09ac3 100644 --- a/src/modules/database/database.module.ts +++ b/src/modules/database/database.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { PrismaService } from './src/adapters/secondaries/prisma-service'; +import { PrismaService } from './adapters/secondaries/prisma-service'; import { AdRepository } from '../ad/adapters/secondaries/ad.repository'; @Module({ diff --git a/src/modules/database/src/domain/matcher-repository.ts b/src/modules/database/domain/matcher-repository.ts similarity index 100% rename from src/modules/database/src/domain/matcher-repository.ts rename to src/modules/database/domain/matcher-repository.ts diff --git a/src/modules/database/src/domain/point.type.ts b/src/modules/database/domain/point.type.ts similarity index 100% rename from src/modules/database/src/domain/point.type.ts rename to src/modules/database/domain/point.type.ts diff --git a/src/modules/database/src/exceptions/database.exception.ts b/src/modules/database/exceptions/database.exception.ts similarity index 100% rename from src/modules/database/src/exceptions/database.exception.ts rename to src/modules/database/exceptions/database.exception.ts diff --git a/src/modules/database/src/interfaces/collection.interface.ts b/src/modules/database/interfaces/collection.interface.ts similarity index 100% rename from src/modules/database/src/interfaces/collection.interface.ts rename to src/modules/database/interfaces/collection.interface.ts diff --git a/src/modules/database/src/interfaces/repository.interface.ts b/src/modules/database/interfaces/repository.interface.ts similarity index 100% rename from src/modules/database/src/interfaces/repository.interface.ts rename to src/modules/database/interfaces/repository.interface.ts diff --git a/src/modules/database/tests/unit/prisma-repository.spec.ts b/src/modules/database/tests/unit/prisma-repository.spec.ts index 1b0e1f7..984c69d 100644 --- a/src/modules/database/tests/unit/prisma-repository.spec.ts +++ b/src/modules/database/tests/unit/prisma-repository.spec.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { PrismaService } from '../../src/adapters/secondaries/prisma-service'; -import { PrismaRepository } from '../../src/adapters/secondaries/prisma-repository.abstract'; -import { DatabaseException } from '../../src/exceptions/database.exception'; +import { PrismaService } from '../../adapters/secondaries/prisma-service'; +import { PrismaRepository } from '../../adapters/secondaries/prisma-repository.abstract'; +import { DatabaseException } from '../../exceptions/database.exception'; import { Prisma } from '@prisma/client'; class FakeEntity { diff --git a/src/modules/matcher/adapters/primaries/matcher.controller.ts b/src/modules/matcher/adapters/primaries/matcher.controller.ts index 76c0f9d..0bbabbf 100644 --- a/src/modules/matcher/adapters/primaries/matcher.controller.ts +++ b/src/modules/matcher/adapters/primaries/matcher.controller.ts @@ -3,9 +3,9 @@ import { InjectMapper } from '@automapper/nestjs'; import { Controller, UsePipes } from '@nestjs/common'; import { QueryBus } from '@nestjs/cqrs'; import { GrpcMethod, RpcException } from '@nestjs/microservices'; -import { RpcValidationPipe } from 'src/modules/utils/pipes/rpc.validation-pipe'; +import { RpcValidationPipe } from '../../../utils/pipes/rpc.validation-pipe'; import { MatchRequest } from '../../domain/dtos/match.request'; -import { ICollection } from 'src/modules/database/src/interfaces/collection.interface'; +import { ICollection } from '../../../database/interfaces/collection.interface'; import { MatchQuery } from '../../queries/match.query'; import { MatchPresenter } from '../secondaries/match.presenter'; import { DefaultParamsProvider } from '../secondaries/default-params.provider';