fix bad validation : wrong cascade update after ad status change

This commit is contained in:
Sylvain Briat 2024-01-17 11:59:51 +01:00
parent 40e8b5f733
commit 5d6547a184
1 changed files with 2 additions and 2 deletions

View File

@ -15,8 +15,8 @@ export class ValidateAdService implements ICommandHandler {
async execute(command: ValidateAdCommand): Promise<AggregateID> {
const ad: AdEntity = await this.repository.findOneById(command.id, {
waypoints: true,
schedule: true,
waypoints: false,
schedule: false,
});
ad.valid();
await this.repository.update(ad.id, ad);