implement basic structure for ad hoc suggestions where we send user a notification for better alternatives after user finished trip
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good

- notification logic still missing
- Weather api missing
This commit is contained in:
2026-01-10 17:09:44 +01:00
parent ea3c941b84
commit 1f439338da
8 changed files with 129 additions and 12 deletions
@@ -43,11 +43,12 @@ public class TripService {
tripRepository.save(trip);
}
public void addTrip(User user, NewTripDTO newTripDTO) {
public Trip addTrip(User user, NewTripDTO newTripDTO) {
Trip trip = tripMapper.toTrip(newTripDTO);
trip.setUser(user);
trip.getTripSegments().forEach(tripSegment -> tripSegment.setTrip(trip));
tripRepository.save(trip);
return trip;
}
public List<TripDTO> getAllTripsOfUser(User user) {