mirror of
https://gitlab.com/mobicoop/v3/service/territory.git
synced 2026-03-28 03:25:50 +00:00
working crud
This commit is contained in:
@@ -18,16 +18,14 @@ export class UpdateTerritoryUseCase {
|
||||
) {}
|
||||
|
||||
async execute(command: UpdateTerritoryCommand): Promise<Territory> {
|
||||
const entity = this._mapper.map(
|
||||
command.updateTerritoryRequest,
|
||||
UpdateTerritoryRequest,
|
||||
Territory,
|
||||
);
|
||||
|
||||
try {
|
||||
const territory = await this._repository.update(
|
||||
const territory = await this._repository.updateTerritory(
|
||||
command.updateTerritoryRequest.uuid,
|
||||
entity,
|
||||
this._mapper.map(
|
||||
command.updateTerritoryRequest,
|
||||
UpdateTerritoryRequest,
|
||||
Territory,
|
||||
),
|
||||
);
|
||||
this._territoryMessager.publish(
|
||||
'update',
|
||||
|
||||
Reference in New Issue
Block a user