| Conditions | 2 | 
| Total Lines | 14 | 
| Code Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | import { QueryHandler } from '@nestjs/cqrs'; | ||
| 14 | |||
| 15 |   public async execute(query: GetShootingByIdQuery): Promise<ShootingView> { | ||
| 16 | const shooting = await this.shootingRepository.findOneById(query.id); | ||
| 17 | |||
| 18 |     if (!shooting) { | ||
| 19 | throw new ShootingNotFoundException(); | ||
| 20 | } | ||
| 21 | |||
| 22 | return new ShootingView( | ||
| 23 | shooting.getId(), | ||
| 24 | shooting.getName(), | ||
| 25 | shooting.getStatus(), | ||
| 26 | shooting.getShootingDate(), | ||
| 27 | shooting.getClosingDate() | ||
| 28 | ); | ||
| 31 |