Incorporated review comments from the editor.

This commit is contained in:
CHANDRAKANT Kumar 2020-05-19 16:56:21 +05:30
parent 642b12365a
commit 24fe7f5fe4
4 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ public class UserAggregate {
} }
public User handleCreateUserCommand(CreateUserCommand command) { public User handleCreateUserCommand(CreateUserCommand command) {
User user = new User(command.getUserId(), command.getFiratName(), command.getLastName()); User user = new User(command.getUserId(), command.getFirstName(), command.getLastName());
writeRepository.addUser(user.getUserid(), user); writeRepository.addUser(user.getUserid(), user);
return user; return user;
} }

View File

@ -8,7 +8,7 @@ import lombok.Data;
public class CreateUserCommand { public class CreateUserCommand {
private String userId; private String userId;
private String firatName; private String firstName;
private String lastName; private String lastName;
} }

View File

@ -28,7 +28,7 @@ public class UserAggregate {
} }
public List<Event> handleCreateUserCommand(CreateUserCommand command) { public List<Event> handleCreateUserCommand(CreateUserCommand command) {
UserCreatedEvent event = new UserCreatedEvent(command.getUserId(), command.getFiratName(), command.getLastName()); UserCreatedEvent event = new UserCreatedEvent(command.getUserId(), command.getFirstName(), command.getLastName());
writeRepository.addEvent(command.getUserId(), event); writeRepository.addEvent(command.getUserId(), event);
return Arrays.asList(event); return Arrays.asList(event);
} }