Add CI and fix conflict in proto definitions
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 30s
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 30s
This commit is contained in:
@@ -10,13 +10,13 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (s *CarpoolServiceServerImpl) CreateBooking(ctx context.Context, req *proto.CreateBookingRequest) (*proto.CreateBookingResponse, error) {
|
||||
func (s *CarpoolServiceServerImpl) CreateBooking(ctx context.Context, req *proto.CreateCarpoolBookingRequest) (*proto.CreateCarpoolBookingResponse, error) {
|
||||
booking := req.Booking.ToOCSS()
|
||||
_, err := s.Handler.Book(booking)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "could not create booking - %s", err.Error())
|
||||
}
|
||||
return &proto.CreateBookingResponse{}, nil
|
||||
return &proto.CreateCarpoolBookingResponse{}, nil
|
||||
}
|
||||
|
||||
func (s *CarpoolServiceServerImpl) GetUserBookings(ctx context.Context, req *proto.GetUserBookingsRequest) (*proto.GetUserBookingsResponse, error) {
|
||||
@@ -54,22 +54,22 @@ func (s *CarpoolServiceServerImpl) GetUserBookings(ctx context.Context, req *pro
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *CarpoolServiceServerImpl) UpdateBooking(ctx context.Context, req *proto.UpdateBookingRequest) (*proto.UpdateBookingResponse, error) {
|
||||
func (s *CarpoolServiceServerImpl) UpdateBooking(ctx context.Context, req *proto.UpdateCarpoolBookingRequest) (*proto.UpdateCarpoolBookingResponse, error) {
|
||||
err := s.Handler.UpdateBookingStatus(req.BookingId, req.Status.ToOCSS())
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "could not update booking status")
|
||||
}
|
||||
return &proto.UpdateBookingResponse{}, nil
|
||||
return &proto.UpdateCarpoolBookingResponse{}, nil
|
||||
}
|
||||
|
||||
func (s *CarpoolServiceServerImpl) GetBooking(ctx context.Context, req *proto.GetBookingRequest) (*proto.GetBookingResponse, error) {
|
||||
func (s *CarpoolServiceServerImpl) GetBooking(ctx context.Context, req *proto.GetCarpoolBookingRequest) (*proto.GetCarpoolBookingResponse, error) {
|
||||
result, err := s.Handler.GetBooking(req.BookingId)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("issue retrieving booking in handler")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &proto.GetBookingResponse{
|
||||
return &proto.GetCarpoolBookingResponse{
|
||||
Booking: proto.BookingFromInternal(*result),
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user