class LegacyDetectorController {

    @GetMapping(path = "/findByUuid", produces = "application/json")
    @ResponseStatus(HttpStatus.OK)
    public DetectorDocument findByUuid(@RequestParam String uuid) {
        DetectorDocument detector = detectorRepo.findByUuid(uuid);
        if (detector == null) {
            throw new RecordNotFoundException("Invalid UUID: " + uuid);
        }
        return detector;
    }

}