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:
@@ -40,7 +40,7 @@
|
||||
</Text>
|
||||
</div>
|
||||
<!-- Transport icons bottom -->
|
||||
<div v-if="hub.transport_types?.length" class="flex items-center gap-1 pt-1">
|
||||
<div v-if="hub.transportTypes?.length" class="flex items-center gap-1 pt-1">
|
||||
<Icon v-if="hasTransport('auto')" name="lucide:truck" size="14" class="text-base-content/50" />
|
||||
<Icon v-if="hasTransport('rail')" name="lucide:train-front" size="14" class="text-base-content/50" />
|
||||
<Icon v-if="hasTransport('sea')" name="lucide:ship" size="14" class="text-base-content/50" />
|
||||
@@ -58,12 +58,12 @@ interface Hub {
|
||||
uuid?: string | null
|
||||
name?: string | null
|
||||
country?: string | null
|
||||
country_code?: string | null
|
||||
countryCode?: string | null
|
||||
latitude?: number | null
|
||||
longitude?: number | null
|
||||
distance?: string
|
||||
distance_km?: number | null
|
||||
transport_types?: (string | null)[] | null
|
||||
distanceKm?: number | null
|
||||
transportTypes?: (string | null)[] | null
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -91,16 +91,16 @@ const isoToEmoji = (code: string): string => {
|
||||
}
|
||||
|
||||
const countryFlag = computed(() => {
|
||||
if (props.hub.country_code) {
|
||||
return isoToEmoji(props.hub.country_code)
|
||||
if (props.hub.countryCode) {
|
||||
return isoToEmoji(props.hub.countryCode)
|
||||
}
|
||||
return '🌍'
|
||||
})
|
||||
|
||||
const hasTransport = (type: string) => props.hub.transport_types?.some(t => t === type)
|
||||
const hasTransport = (type: string) => props.hub.transportTypes?.some(t => t === type)
|
||||
const distanceLabel = computed(() => {
|
||||
if (props.hub.distance) return props.hub.distance
|
||||
if (props.hub.distance_km != null) return `${Math.round(props.hub.distance_km)} km`
|
||||
if (props.hub.distanceKm != null) return `${Math.round(props.hub.distanceKm)} km`
|
||||
return ''
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user