@PostMapping("/{cityId}&{countryId}")
public Device create(
@PathVariable (value = "cityId") Long cityId,
@PathVariable (value = "countryId") Long countryId,
@RequestBody Map<String, String> body){
int id = Integer.parseInt(body.get("id"));
String name = body.get("name");
String note = body.get("note");
String coordinates = body.get("coordinates");
String ip = body.get("ip");
City city = new City(cityRepository.findById(cityId));
Country country = new Country(countryRepository.findById(countryId));
// System.out.println(name);
// System.out.println(cityRepository.findById(cityId));
Device device = new Device(id, name, note, coordinates, ip, country, city);
return
deviceRepository.save(device);
}