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
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
- notification logic still missing - Weather api missing
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user