add endpoint to delete all trips of user

This commit is contained in:
2026-02-22 17:26:42 +01:00
parent 776b8857b6
commit 98cb2536a2
3 changed files with 15 additions and 0 deletions
@@ -75,4 +75,13 @@ public class TripController {
return ResponseEntity.noContent().build();
}
@Operation(summary = "Delete all trips of the authenticated user.")
@DeleteMapping("/deleteAllTrips")
public ResponseEntity<Void> deleteAllTrips() {
User user = currentUser.get();
tripService.deleteAllTripsOfUser(user);
return ResponseEntity.noContent().build();
}
}