This commit is contained in:
Gsk54 2022-12-16 17:31:08 +01:00
parent 9ad61bd6aa
commit 5d8eb42ae6
16 changed files with 16 additions and 16 deletions

2
.env
View File

@ -4,7 +4,7 @@ SERVICE_URL=0.0.0.0
SERVICE_PORT=5001
# PRISMA
DATABASE_URL="postgresql://user:user@db:5432/user?schema=public"
DATABASE_URL="postgresql://user:user@v3-user-db:5432/user?schema=public"
# POSTGRES
POSTGRES_CONTAINER=v3-user-db

View File

@ -4,7 +4,7 @@ SERVICE_URL=0.0.0.0
SERVICE_PORT=5001
# PRISMA
DATABASE_URL="postgresql://user:user@db:5432/user?schema=public"
DATABASE_URL="postgresql://user:user@v3-user-db:5432/user?schema=public"
# POSTGRES
POSTGRES_CONTAINER=v3-user-db

View File

@ -20,7 +20,7 @@ Then execute :
docker-compose up -d
```
The app runs automatically on the port defined in `SERVICE_PORT` of `.env` file (default : _3001_).
The app runs automatically on the port defined in `SERVICE_PORT` of `.env` file (default : _5001_).
You then need to set the appropriate rights for PGAdmin container :

View File

@ -7,10 +7,10 @@ import { DatabaseException } from 'src/modules/database/src/exceptions/DatabaseE
import { CreateUserCommand } from '../../commands/create-user.command';
import { DeleteUserCommand } from '../../commands/delete-user.command';
import { UpdateUserCommand } from '../../commands/update-user.command';
import { CreateUserRequest } from '../../domain/dto/create-user.request';
import { FindAllUsersRequest } from '../../domain/dto/find-all-users.request';
import { FindUserByUuidRequest } from '../../domain/dto/find-user-by-uuid.request';
import { UpdateUserRequest } from '../../domain/dto/update-user.request';
import { CreateUserRequest } from '../../domain/dtos/create-user.request';
import { FindAllUsersRequest } from '../../domain/dtos/find-all-users.request';
import { FindUserByUuidRequest } from '../../domain/dtos/find-user-by-uuid.request';
import { UpdateUserRequest } from '../../domain/dtos/update-user.request';
import { User } from '../../domain/entities/user';
import { FindAllUsersQuery } from '../../queries/find-all-users.query';
import { FindUserByUuidQuery } from '../../queries/find-user-by-uuid.query';

View File

@ -1,4 +1,4 @@
import { CreateUserRequest } from '../domain/dto/create-user.request';
import { CreateUserRequest } from '../domain/dtos/create-user.request';
export class CreateUserCommand {
readonly createUserRequest: CreateUserRequest;

View File

@ -1,4 +1,4 @@
import { UpdateUserRequest } from '../domain/dto/update-user.request';
import { UpdateUserRequest } from '../domain/dtos/update-user.request';
export class UpdateUserCommand {
readonly updateUserRequest: UpdateUserRequest;

View File

@ -3,7 +3,7 @@ import { InjectMapper } from '@automapper/nestjs';
import { CommandHandler } from '@nestjs/cqrs';
import { UsersRepository } from '../../adapters/secondaries/users.repository';
import { CreateUserCommand } from '../../commands/create-user.command';
import { CreateUserRequest } from '../dto/create-user.request';
import { CreateUserRequest } from '../dtos/create-user.request';
import { User } from '../entities/user';
@CommandHandler(CreateUserCommand)

View File

@ -3,7 +3,7 @@ import { InjectMapper } from '@automapper/nestjs';
import { CommandHandler } from '@nestjs/cqrs';
import { UsersRepository } from '../../adapters/secondaries/users.repository';
import { UpdateUserCommand } from '../../commands/update-user.command';
import { UpdateUserRequest } from '../dto/update-user.request';
import { UpdateUserRequest } from '../dtos/update-user.request';
import { User } from '../entities/user';
@CommandHandler(UpdateUserCommand)

View File

@ -2,8 +2,8 @@ import { createMap, forMember, ignore, Mapper } from '@automapper/core';
import { AutomapperProfile, InjectMapper } from '@automapper/nestjs';
import { Injectable } from '@nestjs/common';
import { UserPresenter } from '../adapters/primaries/user.presenter';
import { CreateUserRequest } from '../domain/dto/create-user.request';
import { UpdateUserRequest } from '../domain/dto/update-user.request';
import { CreateUserRequest } from '../domain/dtos/create-user.request';
import { UpdateUserRequest } from '../domain/dtos/update-user.request';
import { User } from '../domain/entities/user';
@Injectable()

View File

@ -1,4 +1,4 @@
import { FindAllUsersRequest } from '../domain/dto/find-all-users.request';
import { FindAllUsersRequest } from '../domain/dtos/find-all-users.request';
export class FindAllUsersQuery {
page: number;

View File

@ -3,7 +3,7 @@ import { AutomapperModule } from '@automapper/nestjs';
import { Test, TestingModule } from '@nestjs/testing';
import { UsersRepository } from '../../adapters/secondaries/users.repository';
import { CreateUserCommand } from '../../commands/create-user.command';
import { CreateUserRequest } from '../../domain/dto/create-user.request';
import { CreateUserRequest } from '../../domain/dtos/create-user.request';
import { User } from '../../domain/entities/user';
import { CreateUserUseCase } from '../../domain/usecases/create-user.usecase';
import { UserProfile } from '../../mappers/user.profile';

View File

@ -3,7 +3,7 @@ import { AutomapperModule } from '@automapper/nestjs';
import { Test, TestingModule } from '@nestjs/testing';
import { UsersRepository } from '../../adapters/secondaries/users.repository';
import { UpdateUserCommand } from '../../commands/update-user.command';
import { UpdateUserRequest } from '../../domain/dto/update-user.request';
import { UpdateUserRequest } from '../../domain/dtos/update-user.request';
import { User } from '../../domain/entities/user';
import { UpdateUserUseCase } from '../../domain/usecases/update-user.usecase';
import { UserProfile } from '../../mappers/user.profile';