solidarity transport update
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 2m4s

This commit is contained in:
2025-05-23 09:45:37 +02:00
parent ea0f2544a7
commit 860e8122b2
9 changed files with 170 additions and 146 deletions

View File

@@ -15,11 +15,18 @@ func (s SolidarityTransportServerImpl) BookDriverJourney(ctx context.Context, re
driverId := req.DriverId
journeyId := req.DriverJourneyId
if err := s.Handler.BookDriverJourney(passengerId, driverId, journeyId); err != nil {
booking, err := s.Handler.BookDriverJourney(passengerId, driverId, journeyId)
if err != nil {
log.Error().Err(err).Msg("issue in BookDriverJourney handler")
return nil, status.Errorf(codes.Internal, "could not create booking : %v", err)
}
return &gen.BookDriverJourneyResponse{}, nil
bookingresp, err := transformers.BookingTypeToProto(booking)
if err != nil {
log.Error().Err(err).Msg("transformation error")
}
return &gen.BookDriverJourneyResponse{
Booking: bookingresp,
}, nil
}
func (s SolidarityTransportServerImpl) GetSolidarityTransportBookings(ctx context.Context, req *gen.GetSolidarityTransportBookingsRequest) (*gen.GetSolidarityTransportBookingsResponse, error) {

View File

@@ -28,6 +28,8 @@ func (s SolidarityTransportServerImpl) GetDriverJourneys(ctx context.Context, re
return nil, status.Errorf(codes.Internal, "could not get driver journeys : %v", err)
}
log.Trace().Any("driver journeys", driverJourneys).Msg("got driver journeys")
results := []*gen.SolidarityTransportDriverJourney{}
for _, j := range driverJourneys {