Gitlab - Argos ALM by PALO IT

get mapping change

parent 4f9855a6
...@@ -41,10 +41,10 @@ public class MeasureController { ...@@ -41,10 +41,10 @@ public class MeasureController {
@GetMapping("/{id}") @GetMapping("/{deviceId}")
public MeasureResponse findById(@PathVariable String id) { public MeasureResponse findById(@PathVariable String deviceId) {
MeasureDTO resultDTO = service.getMeasure(id); MeasureDTO resultDTO = service.getMeasure(deviceId);
log.info("Result Get DTO : [{}]", resultDTO); log.info("Result Get DTO : [{}]", resultDTO);
......
...@@ -22,8 +22,8 @@ public class MeasureService { ...@@ -22,8 +22,8 @@ public class MeasureService {
return mapper.dtoFromDocument(documentResult); return mapper.dtoFromDocument(documentResult);
} }
public MeasureDTO getMeasure(String id){ public MeasureDTO getMeasure(String deviceId){
MeasureDocument document = measureMongoAdapter.findById(id); MeasureDocument document = measureMongoAdapter.findById(deviceId);
return mapper.dtoFromDocument(document); return mapper.dtoFromDocument(document);
} }
} }
...@@ -19,8 +19,8 @@ public class MeasureMongoAdapter { ...@@ -19,8 +19,8 @@ public class MeasureMongoAdapter {
return repository.save(measure); return repository.save(measure);
} }
public MeasureDocument findById(String id) { public MeasureDocument findById(String deviceId) {
return repository.findById(id).orElseThrow(() -> new HttpClientErrorException(HttpStatus.NOT_FOUND)); return repository.findById(deviceId).orElseThrow(() -> new HttpClientErrorException(HttpStatus.NOT_FOUND));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment