quick fix

This commit is contained in:
Azhwani
2021-01-17 02:27:34 +01:00
parent 100e3b652d
commit 8396dabf77
2 changed files with 1 additions and 11 deletions
@@ -23,11 +23,8 @@ public class ProductApi {
@GetMapping("/get")
public Product get(@RequestParam String criterion) throws JsonMappingException, JsonProcessingException {
ObjectMapper objectMapper = new ObjectMapper();
Criterion crt;
crt = objectMapper.readValue(criterion, Criterion.class);
Criterion crt = objectMapper.readValue(criterion, Criterion.class);
if (crt.getProp().equals("name"))
return findByName(crt.getValue());
@@ -46,5 +43,4 @@ public class ProductApi {
}
// Other methods
}