Add PostgreSQL database option and more booking flow functionalities

This commit is contained in:
2023-05-08 01:29:59 +02:00
parent d8346a20be
commit e2e6759dc0
40 changed files with 1594 additions and 907 deletions

View File

@@ -55,7 +55,7 @@ func (s *CarpoolServiceServerImpl) GetUserPlanning(ctx context.Context, req *pro
for _, s := range scheds {
s.Route.ExtraMembers["departure_date"] = s.DepartureDate
s.Route.ExtraMembers["id"] = s.ID
fcraw, _ := s.Route.FeatureCollection().MarshalJSON()
fcraw, _ := s.Route.MarshalJSON()
results[k].Collection = append(results[k].Collection, &proto.CarpoolFeatureCollection{
Serialized: string(fcraw),
})
@@ -73,9 +73,10 @@ func (s *CarpoolServiceServerImpl) GetPlannedTrip(ctx context.Context, req *prot
return nil, status.Errorf(codes.Internal, "could not retrieve planned trip - %s", err.Error())
}
planned_trip.Route.ExtraMembers["id"] = planned_trip.ID
planned_trip.Route.ExtraMembers["departure_date"] = planned_trip.DepartureDate
serialized, err := planned_trip.Route.FeatureCollection().MarshalJSON()
serialized, err := planned_trip.Route.MarshalJSON()
if err != nil {
log.Error().Err(err).Msg("grpc GetPlannedTrip - could not serialize feature collection")
return nil, status.Errorf(codes.Internal, "could not serialize feature collection")