From 3b023412750e4df195ec1ea3b320e76cd106c4a5 Mon Sep 17 00:00:00 2001 From: Gsk54 Date: Fri, 16 Dec 2022 17:31:55 +0100 Subject: [PATCH] refactor --- src/modules/auth/adapters/primaries/auth.controller.ts | 6 +++--- src/modules/auth/commands/create-auth.command.ts | 2 +- src/modules/auth/commands/update-auth.command.ts | 2 +- .../auth/domain/{dto => dtos}/create-auth.request.ts | 0 .../auth/domain/{dto => dtos}/update-auth.request.ts | 0 .../auth/domain/{dto => dtos}/validate-auth.request.ts | 0 src/modules/auth/tests/unit/create-auth.usecase.spec.ts | 2 +- src/modules/auth/tests/unit/update-auth.usecase.spec.ts | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename src/modules/auth/domain/{dto => dtos}/create-auth.request.ts (100%) rename src/modules/auth/domain/{dto => dtos}/update-auth.request.ts (100%) rename src/modules/auth/domain/{dto => dtos}/validate-auth.request.ts (100%) diff --git a/src/modules/auth/adapters/primaries/auth.controller.ts b/src/modules/auth/adapters/primaries/auth.controller.ts index 9fda588..97a3d6d 100644 --- a/src/modules/auth/adapters/primaries/auth.controller.ts +++ b/src/modules/auth/adapters/primaries/auth.controller.ts @@ -6,9 +6,9 @@ import { GrpcMethod, RpcException } from '@nestjs/microservices'; import { DatabaseException } from 'src/modules/database/src/exceptions/DatabaseException'; import { CreateAuthCommand } from '../../commands/create-auth.command'; import { UpdateAuthCommand } from '../../commands/update-auth.command'; -import { CreateAuthRequest } from '../../domain/dto/create-auth.request'; -import { UpdateAuthRequest } from '../../domain/dto/update-auth.request'; -import { ValidateAuthRequest } from '../../domain/dto/validate-auth.request'; +import { CreateAuthRequest } from '../../domain/dtos/create-auth.request'; +import { UpdateAuthRequest } from '../../domain/dtos/update-auth.request'; +import { ValidateAuthRequest } from '../../domain/dtos/validate-auth.request'; import { Auth } from '../../domain/entities/auth'; import { ValidateAuthQuery } from '../../queries/validate-auth.query'; import { AuthPresenter } from './auth.presenter'; diff --git a/src/modules/auth/commands/create-auth.command.ts b/src/modules/auth/commands/create-auth.command.ts index 7a4682d..1b54ebc 100644 --- a/src/modules/auth/commands/create-auth.command.ts +++ b/src/modules/auth/commands/create-auth.command.ts @@ -1,4 +1,4 @@ -import { CreateAuthRequest } from '../domain/dto/create-auth.request'; +import { CreateAuthRequest } from '../domain/dtos/create-auth.request'; export class CreateAuthCommand { readonly createAuthRequest: CreateAuthRequest; diff --git a/src/modules/auth/commands/update-auth.command.ts b/src/modules/auth/commands/update-auth.command.ts index 146b8b9..a1faebe 100644 --- a/src/modules/auth/commands/update-auth.command.ts +++ b/src/modules/auth/commands/update-auth.command.ts @@ -1,4 +1,4 @@ -import { UpdateAuthRequest } from '../domain/dto/update-auth.request'; +import { UpdateAuthRequest } from '../domain/dtos/update-auth.request'; export class UpdateAuthCommand { readonly updateAuthRequest: UpdateAuthRequest; diff --git a/src/modules/auth/domain/dto/create-auth.request.ts b/src/modules/auth/domain/dtos/create-auth.request.ts similarity index 100% rename from src/modules/auth/domain/dto/create-auth.request.ts rename to src/modules/auth/domain/dtos/create-auth.request.ts diff --git a/src/modules/auth/domain/dto/update-auth.request.ts b/src/modules/auth/domain/dtos/update-auth.request.ts similarity index 100% rename from src/modules/auth/domain/dto/update-auth.request.ts rename to src/modules/auth/domain/dtos/update-auth.request.ts diff --git a/src/modules/auth/domain/dto/validate-auth.request.ts b/src/modules/auth/domain/dtos/validate-auth.request.ts similarity index 100% rename from src/modules/auth/domain/dto/validate-auth.request.ts rename to src/modules/auth/domain/dtos/validate-auth.request.ts diff --git a/src/modules/auth/tests/unit/create-auth.usecase.spec.ts b/src/modules/auth/tests/unit/create-auth.usecase.spec.ts index c2f73e2..8ced70e 100644 --- a/src/modules/auth/tests/unit/create-auth.usecase.spec.ts +++ b/src/modules/auth/tests/unit/create-auth.usecase.spec.ts @@ -3,7 +3,7 @@ import { AutomapperModule } from '@automapper/nestjs'; import { Test, TestingModule } from '@nestjs/testing'; import { AuthRepository } from '../../adapters/secondaries/auth.repository'; import { CreateAuthCommand } from '../../commands/create-auth.command'; -import { CreateAuthRequest } from '../../domain/dto/create-auth.request'; +import { CreateAuthRequest } from '../../domain/dtos/create-auth.request'; import { Auth } from '../../domain/entities/auth'; import { CreateAuthUseCase } from '../../domain/usecases/create-auth.usecase'; import { AuthProfile } from '../../mappers/auth.profile'; diff --git a/src/modules/auth/tests/unit/update-auth.usecase.spec.ts b/src/modules/auth/tests/unit/update-auth.usecase.spec.ts index 0dc1816..8476f37 100644 --- a/src/modules/auth/tests/unit/update-auth.usecase.spec.ts +++ b/src/modules/auth/tests/unit/update-auth.usecase.spec.ts @@ -2,7 +2,7 @@ import { classes } from '@automapper/classes'; import { AutomapperModule } from '@automapper/nestjs'; import { Test, TestingModule } from '@nestjs/testing'; import { UpdateAuthCommand } from '../../commands/update-auth.command'; -import { UpdateAuthRequest } from '../../domain/dto/update-auth.request'; +import { UpdateAuthRequest } from '../../domain/dtos/update-auth.request'; import { Auth } from '../../domain/entities/auth'; import * as bcrypt from 'bcrypt'; import { UpdateAuthUseCase } from '../../domain/usecases/update-auth.usecase';