fix: migrate geo GraphQL queries and frontend to camelCase
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:
Ruslan Bakiev
2026-03-10 14:10:23 +07:00
parent 4467d20160
commit 29c34a048a
30 changed files with 349 additions and 349 deletions

View File

@@ -38,8 +38,8 @@
<Stack gap="2">
<NuxtLink
v-for="(edge, index) in edges"
:key="edge.to_uuid ?? index"
:to="localePath(`/catalog/hubs/${edge.to_uuid}`)"
:key="edge.toUuid ?? index"
:to="localePath(`/catalog/hubs/${edge.toUuid}`)"
class="flex flex-col gap-2 p-3 rounded-lg border border-base-300 hover:bg-base-200 transition-colors"
>
<div class="flex items-center justify-between">
@@ -48,11 +48,11 @@
<Icon name="lucide:map-pin" size="16" class="text-primary" />
</div>
<div>
<div class="font-medium">{{ edge.to_name }}</div>
<div class="font-medium">{{ edge.toName }}</div>
</div>
</div>
<div class="text-right">
<div class="font-semibold text-primary">{{ edge.distance_km }} km</div>
<div class="font-semibold text-primary">{{ edge.distanceKm }} km</div>
</div>
</div>
</NuxtLink>
@@ -124,8 +124,8 @@ const mapCenter = computed<[number, number]>(() => {
return [0, 0]
}
const allLats = [props.currentHub.latitude, ...props.edges.map(e => e.to_latitude!).filter(Boolean)]
const allLngs = [props.currentHub.longitude, ...props.edges.map(e => e.to_longitude!).filter(Boolean)]
const allLats = [props.currentHub.latitude, ...props.edges.map(e => e.toLatitude!).filter(Boolean)]
const allLngs = [props.currentHub.longitude, ...props.edges.map(e => e.toLongitude!).filter(Boolean)]
const avgLng = allLngs.reduce((a, b) => a + b, 0) / allLngs.length
const avgLat = allLats.reduce((a, b) => a + b, 0) / allLats.length
@@ -166,16 +166,16 @@ const buildRouteFeatureCollection = () => ({
const buildNeighborsFeatureCollection = () => ({
type: 'FeatureCollection' as const,
features: props.edges.filter(e => e.to_latitude && e.to_longitude).map(edge => ({
features: props.edges.filter(e => e.toLatitude && e.toLongitude).map(edge => ({
type: 'Feature' as const,
properties: {
uuid: edge.to_uuid,
name: edge.to_name,
distanceKm: edge.distance_km
uuid: edge.toUuid,
name: edge.toName,
distanceKm: edge.distanceKm
},
geometry: {
type: 'Point' as const,
coordinates: [edge.to_longitude!, edge.to_latitude!]
coordinates: [edge.toLongitude!, edge.toLatitude!]
}
}))
})