Ignore:
Timestamp:
02/04/24 16:57:49 (9 months ago)
Author:
darsov2 <62809499+darsov2@…>
Branches:
master
Children:
efaa053
Parents:
07f4e8b
Message:

ouath, mailing impl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/tourMate/controllers/TransportController.java

    r07f4e8b r0f5aa27  
    8484    @PostMapping(path = "/transport/available/add")
    8585    public void add(@RequestBody TransportAvailible transportAvailable, @RequestParam(name = "transportId") long transportId) {
    86         Transport t = transportManager.getTransportById(transportId);
    87         List<TransportRoute> routes = transportAvailable.getRoutes().stream().toList();
    88         routes.get(0).setDeparture(transportAvailable.getDate());
    89         transportAvailable.setTime(routes.get(routes.size() - 1).getArrival());
    90         routes.forEach(x -> x.setParentRoute(transportAvailable));
    91         transportAvailable.setTransport(t);
    92         transportManager.createTransportAvailable(transportAvailable.getTransport(), transportAvailable.getFrom(), transportAvailable.getTo(), transportAvailable.getDate(), transportAvailable.getFreeSpace(), transportAvailable.getTime(), routes);
     86
     87        transportManager.createTransportAvailable(transportAvailable, transportAvailable.getTransport(), transportAvailable.getFrom(), transportAvailable.getTo(), transportAvailable.getDate(), transportAvailable.getFreeSpace(), transportAvailable.getTime(), transportId, transportAvailable.getRoutes());
    9388    }
    9489
Note: See TracChangeset for help on using the changeset viewer.