refactore module name
This commit is contained in:
parent
30b5f8389e
commit
c34b15c0f4
|
@ -4,13 +4,13 @@ import { Module } from '@nestjs/common';
|
||||||
import { ConfigModule } from '@nestjs/config';
|
import { ConfigModule } from '@nestjs/config';
|
||||||
import { ConfigurationModule } from './modules/configuration/configuration.module';
|
import { ConfigurationModule } from './modules/configuration/configuration.module';
|
||||||
import { HealthModule } from './modules/health/health.module';
|
import { HealthModule } from './modules/health/health.module';
|
||||||
import { UsersModule } from './modules/users/users.module';
|
import { UserModule } from './modules/user/user.module';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
ConfigModule.forRoot({ isGlobal: true }),
|
ConfigModule.forRoot({ isGlobal: true }),
|
||||||
AutomapperModule.forRoot({ strategyInitializer: classes() }),
|
AutomapperModule.forRoot({ strategyInitializer: classes() }),
|
||||||
UsersModule,
|
UserModule,
|
||||||
ConfigurationModule,
|
ConfigurationModule,
|
||||||
HealthModule,
|
HealthModule,
|
||||||
],
|
],
|
||||||
|
|
|
@ -11,7 +11,7 @@ async function bootstrap() {
|
||||||
options: {
|
options: {
|
||||||
package: ['user', 'health'],
|
package: ['user', 'health'],
|
||||||
protoPath: [
|
protoPath: [
|
||||||
join(__dirname, 'modules/users/adapters/primaries/user.proto'),
|
join(__dirname, 'modules/user/adapters/primaries/user.proto'),
|
||||||
join(__dirname, 'modules/health/adapters/primaries/health.proto'),
|
join(__dirname, 'modules/health/adapters/primaries/health.proto'),
|
||||||
],
|
],
|
||||||
url: process.env.SERVICE_URL + ':' + process.env.SERVICE_PORT,
|
url: process.env.SERVICE_URL + ':' + process.env.SERVICE_PORT,
|
||||||
|
|
|
@ -31,7 +31,7 @@ import { RpcValidationPipe } from '../../../../utils/pipes/rpc.validation-pipe';
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
@Controller()
|
@Controller()
|
||||||
export class UsersController {
|
export class UserController {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly _commandBus: CommandBus,
|
private readonly _commandBus: CommandBus,
|
||||||
private readonly _queryBus: QueryBus,
|
private readonly _queryBus: QueryBus,
|
|
@ -5,7 +5,7 @@ import { ConfigModule, ConfigService } from '@nestjs/config';
|
||||||
import { CqrsModule } from '@nestjs/cqrs';
|
import { CqrsModule } from '@nestjs/cqrs';
|
||||||
import { redisStore } from 'cache-manager-ioredis-yet';
|
import { redisStore } from 'cache-manager-ioredis-yet';
|
||||||
import { DatabaseModule } from '../database/database.module';
|
import { DatabaseModule } from '../database/database.module';
|
||||||
import { UsersController } from './adapters/primaries/users.controller';
|
import { UserController } from './adapters/primaries/user.controller';
|
||||||
import { Messager } from './adapters/secondaries/messager';
|
import { Messager } from './adapters/secondaries/messager';
|
||||||
import { UsersRepository } from './adapters/secondaries/users.repository';
|
import { UsersRepository } from './adapters/secondaries/users.repository';
|
||||||
import { CreateUserUseCase } from './domain/usecases/create-user.usecase';
|
import { CreateUserUseCase } from './domain/usecases/create-user.usecase';
|
||||||
|
@ -46,7 +46,7 @@ import { UserProfile } from './mappers/user.profile';
|
||||||
inject: [ConfigService],
|
inject: [ConfigService],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
controllers: [UsersController],
|
controllers: [UserController],
|
||||||
providers: [
|
providers: [
|
||||||
UserProfile,
|
UserProfile,
|
||||||
UsersRepository,
|
UsersRepository,
|
||||||
|
@ -59,4 +59,4 @@ import { UserProfile } from './mappers/user.profile';
|
||||||
],
|
],
|
||||||
exports: [],
|
exports: [],
|
||||||
})
|
})
|
||||||
export class UsersModule {}
|
export class UserModule {}
|
|
@ -1,5 +1,5 @@
|
||||||
import { ArgumentMetadata } from '@nestjs/common';
|
import { ArgumentMetadata } from '@nestjs/common';
|
||||||
import { UpdateUserRequest } from '../../../modules/users/domain/dtos/update-user.request';
|
import { UpdateUserRequest } from '../../../modules/user/domain/dtos/update-user.request';
|
||||||
import { RpcValidationPipe } from '../../pipes/rpc.validation-pipe';
|
import { RpcValidationPipe } from '../../pipes/rpc.validation-pipe';
|
||||||
|
|
||||||
describe('RpcValidationPipe', () => {
|
describe('RpcValidationPipe', () => {
|
||||||
|
|
Loading…
Reference in New Issue