fix user id

This commit is contained in:
sbriat 2023-10-10 16:52:36 +02:00
parent e7c5f200f1
commit 7974429fdd
2 changed files with 1 additions and 2 deletions

View File

@ -12,7 +12,6 @@ export class UserEntity extends AggregateRoot<UserProps> {
const id = create.id ?? v4();
const props: UserProps = { ...create };
const user = new UserEntity({ id, props });
user.addEvent(
new UserCreatedDomainEvent({
aggregateId: id,

View File

@ -21,7 +21,7 @@ export class UserMapper
toPersistence = (entity: UserEntity): UserWriteModel => {
const copy = entity.getProps();
const record: UserWriteModel = {
uuid: copy.id,
uuid: entity.id,
firstName: copy.firstName,
lastName: copy.lastName,
email: copy.email,