fixed redundant id in update methods

This commit is contained in:
Tommaso Rodolfo Masera 2020-02-26 11:40:33 +01:00
parent 3c0c09c375
commit 4818929dad
5 changed files with 5 additions and 5 deletions

View file

@ -28,7 +28,7 @@ public class RoomController {
return roomRepository.save(r); return roomRepository.save(r);
} }
@PutMapping("/{id}") @PutMapping
public Room update(@RequestBody Room r) { public Room update(@RequestBody Room r) {
return roomRepository.save(r); return roomRepository.save(r);
} }

View file

@ -28,7 +28,7 @@ public class SensorController {
return sensorRepository.save(s); return sensorRepository.save(s);
} }
@PutMapping("/{id}") @PutMapping
public Sensor update(@RequestBody Sensor s) { public Sensor update(@RequestBody Sensor s) {
return sensorRepository.save(s); return sensorRepository.save(s);
} }

View file

@ -28,7 +28,7 @@ public class SmartPlugController {
return smartPlugRepository.save(sp); return smartPlugRepository.save(sp);
} }
@PutMapping("/{id}") @PutMapping
public SmartPlug update(@RequestBody SmartPlug sp) { public SmartPlug update(@RequestBody SmartPlug sp) {
return smartPlugRepository.save(sp); return smartPlugRepository.save(sp);
} }

View file

@ -28,7 +28,7 @@ public class SwitchController {
return switchRepository.save(s); return switchRepository.save(s);
} }
@PutMapping("/{id}") @PutMapping
public Switch update(@RequestBody Switch s) { public Switch update(@RequestBody Switch s) {
return switchRepository.save(s); return switchRepository.save(s);
} }

View file

@ -28,7 +28,7 @@ public class UserController {
return userRepository.save(u); return userRepository.save(u);
} }
@PutMapping("/{id}") @PutMapping
public User update(@RequestBody User u) { public User update(@RequestBody User u) {
return userRepository.save(u); return userRepository.save(u);
} }