Merge branch 'main' of https://github.com/Parpaillax/Ludotheque
# Conflicts: # src/main/java/fr/eni/demo/controller/ClientController.java
This commit is contained in:
@@ -60,4 +60,15 @@ public class ClientController {
|
||||
response.put("data", data);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@DeleteMapping("/{id]")
|
||||
public ResponseEntity<Map<String, Object>> delete(@PathVariable Long id) {
|
||||
clientService.delete(id);
|
||||
Map<String, Object> response = new HashMap<>();
|
||||
response.put("message", "Client deleted successfully");
|
||||
response.put("status", 200);
|
||||
response.put("data", new HashMap<>());
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user