fix: migrate geo GraphQL queries and frontend to camelCase
All checks were successful
Build Docker Image / build (push) Successful in 5m0s
All checks were successful
Build Docker Image / build (push) Successful in 5m0s
Geo backend was migrated to camelCase but frontend .graphql files and component code still used snake_case, causing 400 errors on all geo API calls.
This commit is contained in:
@@ -152,17 +152,17 @@ const fetchOffersByHub = async () => {
|
||||
'geo'
|
||||
)
|
||||
|
||||
const offers = offersResponse?.nearest_offers || []
|
||||
const offers = offersResponse?.nearestOffers || []
|
||||
|
||||
// Offers already include routes from backend
|
||||
const offersWithRoutes = offers
|
||||
.filter((offer): offer is NonNullable<OfferWithRoute> => offer !== null)
|
||||
.map((offer) => ({
|
||||
sourceUuid: offer.uuid,
|
||||
sourceName: offer.product_name,
|
||||
sourceName: offer.productName,
|
||||
sourceLat: offer.latitude,
|
||||
sourceLon: offer.longitude,
|
||||
distanceKm: offer.distance_km,
|
||||
distanceKm: offer.distanceKm,
|
||||
routes: offer.routes || []
|
||||
}))
|
||||
|
||||
@@ -209,10 +209,10 @@ const getRouteStages = (option: ProductRouteOption) => {
|
||||
return route.stages
|
||||
.filter((stage): stage is NonNullable<RouteStage> => stage !== null)
|
||||
.map((stage) => ({
|
||||
transportType: stage.transport_type,
|
||||
distanceKm: stage.distance_km,
|
||||
travelTimeSeconds: stage.travel_time_seconds,
|
||||
fromName: stage.from_name
|
||||
transportType: stage.transportType,
|
||||
distanceKm: stage.distanceKm,
|
||||
travelTimeSeconds: stage.travelTimeSeconds,
|
||||
fromName: stage.fromName
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user