fixed redundant id in update methods
This commit is contained in:
parent
3c0c09c375
commit
4818929dad
5 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue