url delete-pref

This commit is contained in:
Thomas Cardon 2022-01-25 11:38:20 +01:00
parent 786d8b23d9
commit 39c546794c
1 changed files with 5 additions and 5 deletions

View File

@ -61,11 +61,11 @@ public class PreferenceController {
// return ResponseEntity.status(HttpStatus.OK).body(preferenceRepository.save(personne));
// }
//
// @DeleteMapping(value = "/delete-restaurant/{id}")
// public void suppressionPerso(@PathVariable int id){
//
// preferenceRepository.deleteById(id);
// }
@DeleteMapping("/delete-preference/{idrestau}/{iduser}")
public void deletePreferenceById(@PathVariable int iduser, @PathVariable int idrestau ){
PreferencePK id = new PreferencePK(personneRepository.getById(iduser) ,restaurantRepository.getById(idrestau));
preferenceRepository.deleteById(id);
}
}