updates
This commit is contained in:
parent
9ad61bd6aa
commit
5d8eb42ae6
2
.env
2
.env
|
@ -4,7 +4,7 @@ SERVICE_URL=0.0.0.0
|
||||||
SERVICE_PORT=5001
|
SERVICE_PORT=5001
|
||||||
|
|
||||||
# PRISMA
|
# 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
|
||||||
POSTGRES_CONTAINER=v3-user-db
|
POSTGRES_CONTAINER=v3-user-db
|
||||||
|
|
|
@ -4,7 +4,7 @@ SERVICE_URL=0.0.0.0
|
||||||
SERVICE_PORT=5001
|
SERVICE_PORT=5001
|
||||||
|
|
||||||
# PRISMA
|
# 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
|
||||||
POSTGRES_CONTAINER=v3-user-db
|
POSTGRES_CONTAINER=v3-user-db
|
||||||
|
|
|
@ -20,7 +20,7 @@ Then execute :
|
||||||
docker-compose up -d
|
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 :
|
You then need to set the appropriate rights for PGAdmin container :
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,10 @@ import { DatabaseException } from 'src/modules/database/src/exceptions/DatabaseE
|
||||||
import { CreateUserCommand } from '../../commands/create-user.command';
|
import { CreateUserCommand } from '../../commands/create-user.command';
|
||||||
import { DeleteUserCommand } from '../../commands/delete-user.command';
|
import { DeleteUserCommand } from '../../commands/delete-user.command';
|
||||||
import { UpdateUserCommand } from '../../commands/update-user.command';
|
import { UpdateUserCommand } from '../../commands/update-user.command';
|
||||||
import { CreateUserRequest } from '../../domain/dto/create-user.request';
|
import { CreateUserRequest } from '../../domain/dtos/create-user.request';
|
||||||
import { FindAllUsersRequest } from '../../domain/dto/find-all-users.request';
|
import { FindAllUsersRequest } from '../../domain/dtos/find-all-users.request';
|
||||||
import { FindUserByUuidRequest } from '../../domain/dto/find-user-by-uuid.request';
|
import { FindUserByUuidRequest } from '../../domain/dtos/find-user-by-uuid.request';
|
||||||
import { UpdateUserRequest } from '../../domain/dto/update-user.request';
|
import { UpdateUserRequest } from '../../domain/dtos/update-user.request';
|
||||||
import { User } from '../../domain/entities/user';
|
import { User } from '../../domain/entities/user';
|
||||||
import { FindAllUsersQuery } from '../../queries/find-all-users.query';
|
import { FindAllUsersQuery } from '../../queries/find-all-users.query';
|
||||||
import { FindUserByUuidQuery } from '../../queries/find-user-by-uuid.query';
|
import { FindUserByUuidQuery } from '../../queries/find-user-by-uuid.query';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { CreateUserRequest } from '../domain/dto/create-user.request';
|
import { CreateUserRequest } from '../domain/dtos/create-user.request';
|
||||||
|
|
||||||
export class CreateUserCommand {
|
export class CreateUserCommand {
|
||||||
readonly createUserRequest: CreateUserRequest;
|
readonly createUserRequest: CreateUserRequest;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { UpdateUserRequest } from '../domain/dto/update-user.request';
|
import { UpdateUserRequest } from '../domain/dtos/update-user.request';
|
||||||
|
|
||||||
export class UpdateUserCommand {
|
export class UpdateUserCommand {
|
||||||
readonly updateUserRequest: UpdateUserRequest;
|
readonly updateUserRequest: UpdateUserRequest;
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { InjectMapper } from '@automapper/nestjs';
|
||||||
import { CommandHandler } from '@nestjs/cqrs';
|
import { CommandHandler } from '@nestjs/cqrs';
|
||||||
import { UsersRepository } from '../../adapters/secondaries/users.repository';
|
import { UsersRepository } from '../../adapters/secondaries/users.repository';
|
||||||
import { CreateUserCommand } from '../../commands/create-user.command';
|
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';
|
import { User } from '../entities/user';
|
||||||
|
|
||||||
@CommandHandler(CreateUserCommand)
|
@CommandHandler(CreateUserCommand)
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { InjectMapper } from '@automapper/nestjs';
|
||||||
import { CommandHandler } from '@nestjs/cqrs';
|
import { CommandHandler } from '@nestjs/cqrs';
|
||||||
import { UsersRepository } from '../../adapters/secondaries/users.repository';
|
import { UsersRepository } from '../../adapters/secondaries/users.repository';
|
||||||
import { UpdateUserCommand } from '../../commands/update-user.command';
|
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';
|
import { User } from '../entities/user';
|
||||||
|
|
||||||
@CommandHandler(UpdateUserCommand)
|
@CommandHandler(UpdateUserCommand)
|
||||||
|
|
|
@ -2,8 +2,8 @@ import { createMap, forMember, ignore, Mapper } from '@automapper/core';
|
||||||
import { AutomapperProfile, InjectMapper } from '@automapper/nestjs';
|
import { AutomapperProfile, InjectMapper } from '@automapper/nestjs';
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { UserPresenter } from '../adapters/primaries/user.presenter';
|
import { UserPresenter } from '../adapters/primaries/user.presenter';
|
||||||
import { CreateUserRequest } from '../domain/dto/create-user.request';
|
import { CreateUserRequest } from '../domain/dtos/create-user.request';
|
||||||
import { UpdateUserRequest } from '../domain/dto/update-user.request';
|
import { UpdateUserRequest } from '../domain/dtos/update-user.request';
|
||||||
import { User } from '../domain/entities/user';
|
import { User } from '../domain/entities/user';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
|
@ -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 {
|
export class FindAllUsersQuery {
|
||||||
page: number;
|
page: number;
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { AutomapperModule } from '@automapper/nestjs';
|
||||||
import { Test, TestingModule } from '@nestjs/testing';
|
import { Test, TestingModule } from '@nestjs/testing';
|
||||||
import { UsersRepository } from '../../adapters/secondaries/users.repository';
|
import { UsersRepository } from '../../adapters/secondaries/users.repository';
|
||||||
import { CreateUserCommand } from '../../commands/create-user.command';
|
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 { User } from '../../domain/entities/user';
|
||||||
import { CreateUserUseCase } from '../../domain/usecases/create-user.usecase';
|
import { CreateUserUseCase } from '../../domain/usecases/create-user.usecase';
|
||||||
import { UserProfile } from '../../mappers/user.profile';
|
import { UserProfile } from '../../mappers/user.profile';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { AutomapperModule } from '@automapper/nestjs';
|
||||||
import { Test, TestingModule } from '@nestjs/testing';
|
import { Test, TestingModule } from '@nestjs/testing';
|
||||||
import { UsersRepository } from '../../adapters/secondaries/users.repository';
|
import { UsersRepository } from '../../adapters/secondaries/users.repository';
|
||||||
import { UpdateUserCommand } from '../../commands/update-user.command';
|
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 { User } from '../../domain/entities/user';
|
||||||
import { UpdateUserUseCase } from '../../domain/usecases/update-user.usecase';
|
import { UpdateUserUseCase } from '../../domain/usecases/update-user.usecase';
|
||||||
import { UserProfile } from '../../mappers/user.profile';
|
import { UserProfile } from '../../mappers/user.profile';
|
||||||
|
|
Loading…
Reference in New Issue