Merge branch 'fixUserId' into 'main'
Fix user id See merge request v3/service/user!42
This commit is contained in:
commit
aa77a64cd2
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@mobicoop/user",
|
"name": "@mobicoop/user",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@mobicoop/user",
|
"name": "@mobicoop/user",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"license": "AGPL",
|
"license": "AGPL",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.8.0",
|
"@grpc/grpc-js": "^1.8.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@mobicoop/user",
|
"name": "@mobicoop/user",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "Mobicoop V3 User Service",
|
"description": "Mobicoop V3 User Service",
|
||||||
"author": "sbriat",
|
"author": "sbriat",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|
|
@ -12,7 +12,6 @@ export class UserEntity extends AggregateRoot<UserProps> {
|
||||||
const id = create.id ?? v4();
|
const id = create.id ?? v4();
|
||||||
const props: UserProps = { ...create };
|
const props: UserProps = { ...create };
|
||||||
const user = new UserEntity({ id, props });
|
const user = new UserEntity({ id, props });
|
||||||
|
|
||||||
user.addEvent(
|
user.addEvent(
|
||||||
new UserCreatedDomainEvent({
|
new UserCreatedDomainEvent({
|
||||||
aggregateId: id,
|
aggregateId: id,
|
||||||
|
|
|
@ -21,7 +21,7 @@ export class UserMapper
|
||||||
toPersistence = (entity: UserEntity): UserWriteModel => {
|
toPersistence = (entity: UserEntity): UserWriteModel => {
|
||||||
const copy = entity.getProps();
|
const copy = entity.getProps();
|
||||||
const record: UserWriteModel = {
|
const record: UserWriteModel = {
|
||||||
uuid: copy.id,
|
uuid: entity.id,
|
||||||
firstName: copy.firstName,
|
firstName: copy.firstName,
|
||||||
lastName: copy.lastName,
|
lastName: copy.lastName,
|
||||||
email: copy.email,
|
email: copy.email,
|
||||||
|
|
Loading…
Reference in New Issue