Return handling
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 40s
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 40s
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user