Skip to content

Commit b95efb7

Browse files
committedSep 14, 2021
refactor: changed property names for a service
1 parent f65c8cd commit b95efb7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
 

‎src/modules/user/commands/create-user/create-user.http.controller.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { CreateUserHttpRequest } from './create-user.request.dto';
1111
export class CreateUserHttpController {
1212
constructor(
1313
@Inject(createUserSymbol)
14-
private readonly createUser: CreateUserService,
14+
private readonly service: CreateUserService,
1515
) {}
1616

1717
@Post(routes.user.root)
@@ -30,7 +30,7 @@ export class CreateUserHttpController {
3030
async create(@Body() body: CreateUserHttpRequest): Promise<IdResponse> {
3131
const command = new CreateUserCommand(body);
3232

33-
const id = await this.createUser.createUser(command);
33+
const id = await this.service.createUser(command);
3434

3535
return new IdResponse(id.value);
3636
}

‎src/modules/user/commands/create-user/create-user.message.controller.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import { CreateUserService } from './create-user.service';
99
export class CreateUserMessageController {
1010
constructor(
1111
@Inject(createUserSymbol)
12-
private readonly createUser: CreateUserService,
12+
private readonly service: CreateUserService,
1313
) {}
1414

1515
@MessagePattern('user.create') // <- Subscribe to a microservice message
1616
async create(message: CreateUserMessageRequest): Promise<IdResponse> {
1717
const command = new CreateUserCommand(message);
1818

19-
const id = await this.createUser.createUser(command);
19+
const id = await this.service.createUser(command);
2020

2121
return new IdResponse(id.value);
2222
}

‎src/modules/user/queries/find-users/find-users.http.controller.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class FindUsersHttpController {
1111

1212
/* Since this is a simple query with no additional business
1313
logic involved, it bypasses application's core completely
14-
and retrieves user directly from repository.
14+
and retrieves users directly from a repository.
1515
*/
1616
@Get(routes.user.root)
1717
async findUsers(

0 commit comments

Comments
 (0)
Failed to load comments.