mirror of
https://gitlab.com/mobicoop/v3/service/ad.git
synced 2026-01-29 11:20:46 +00:00
fix bad validation : wrong cascade update after ad status change
This commit is contained in:
@@ -15,8 +15,8 @@ export class ValidateAdService implements ICommandHandler {
|
|||||||
|
|
||||||
async execute(command: ValidateAdCommand): Promise<AggregateID> {
|
async execute(command: ValidateAdCommand): Promise<AggregateID> {
|
||||||
const ad: AdEntity = await this.repository.findOneById(command.id, {
|
const ad: AdEntity = await this.repository.findOneById(command.id, {
|
||||||
waypoints: true,
|
waypoints: false,
|
||||||
schedule: true,
|
schedule: false,
|
||||||
});
|
});
|
||||||
ad.valid();
|
ad.valid();
|
||||||
await this.repository.update(ad.id, ad);
|
await this.repository.update(ad.id, ad);
|
||||||
|
|||||||
Reference in New Issue
Block a user