diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/SensorController.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/SensorController.java index a014e79..c58d68f 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/SensorController.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/SensorController.java @@ -64,8 +64,8 @@ public class SensorController { @PutMapping("/{id}/simulation") public Sensor updateSimulation( @PathVariable("id") Long sensorId, - @RequestParam("error") BigDecimal error, - @RequestParam("typical") BigDecimal typical, + @RequestBody BigDecimal error, + @RequestBody BigDecimal typical, final Principal principal) throws NotFoundException { return sensorService.updateSimulationFromSensor( diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/SensorSaveRequest.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/SensorSaveRequest.java index f5558c7..59a089a 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/SensorSaveRequest.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/SensorSaveRequest.java @@ -20,10 +20,6 @@ public class SensorSaveRequest { @NotNull private BigDecimal value; - private BigDecimal error; - - private BigDecimal typical; - /** * The room this device belongs in, as a foreign key id. To use when updating and inserting from * a REST call.