diff --git a/src/modules/authentication/core/domain/username.entity.ts b/src/modules/authentication/core/domain/username.entity.ts index e9cd325..287c351 100644 --- a/src/modules/authentication/core/domain/username.entity.ts +++ b/src/modules/authentication/core/domain/username.entity.ts @@ -41,7 +41,7 @@ export class UsernameEntity extends AggregateRoot { delete(): void { this.addEvent( new UsernameDeletedDomainEvent({ - aggregateId: this.id, + aggregateId: this.props.name, }), ); } diff --git a/src/modules/authentication/interface/grpc-controllers/authentication.proto b/src/modules/authentication/interface/grpc-controllers/authentication.proto index 519eb56..645be84 100644 --- a/src/modules/authentication/interface/grpc-controllers/authentication.proto +++ b/src/modules/authentication/interface/grpc-controllers/authentication.proto @@ -8,7 +8,7 @@ service AuthenticationService { rpc AddUsername(UsernameWithId) returns (Id); rpc UpdatePassword(Password) returns (Id); rpc UpdateUsername(UsernameWithId) returns (Id); - rpc DeleteUsername(Name) returns (Id); + rpc DeleteUsername(Name) returns (Empty); rpc Delete(UserId) returns (Empty); }