Return handling
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 40s

This commit is contained in:
2025-05-28 07:32:24 +02:00
parent 3d32c9a24a
commit d237401c81
17 changed files with 587 additions and 249 deletions

View File

@@ -22,7 +22,7 @@ func (s SolidarityTransportServerImpl) GetDriverJourneys(ctx context.Context, re
return nil, status.Errorf(codes.Internal, "arrival unmarhsalling error : %v", err)
}
driverJourneys, err := s.Handler.GetDriverJourneys(departure, arrival, departureDate)
driverJourneys, err := s.Handler.GetDriverJourneys(departure, arrival, departureDate, req.Noreturn)
if err != nil {
log.Error().Err(err).Msg("issue in GetDriverJourneys handler")
return nil, status.Errorf(codes.Internal, "could not get driver journeys : %v", err)
@@ -67,3 +67,14 @@ func (s SolidarityTransportServerImpl) GetDriverJourney(ctx context.Context, req
DriverJourney: protojourney,
}, nil
}
func (s SolidarityTransportServerImpl) ToggleSolidarityTransportNoreturn(ctx context.Context, req *gen.ToggleSolidarityTransportNoreturnRequest) (*gen.ToggleSolidarityTransportNoreturnResponse, error) {
journeyid := req.JourneyId
err := s.Handler.ToggleDriverJourneyNoreturn(journeyid)
if err != nil {
log.Error().Err(err).Msg("could not update data")
return nil, status.Errorf(codes.NotFound, "could not update data : %v", err)
}
return &gen.ToggleSolidarityTransportNoreturnResponse{}, nil
}