Skip to content

Commit

Permalink
Photon and photon reverse are the same URL
Browse files Browse the repository at this point in the history
  • Loading branch information
laem committed Oct 28, 2024
1 parent 7851e9e commit 9535ba8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ NEXT_PUBLIC_GTFS_SERVER_URL = "https://serveur.cartes.app/gtfs"
NEXT_PUBLIC_PMTILES_SERVER_URL = "https://serveur.cartes.app/pmtiles"
NEXT_PUBLIC_MOTIS_SERVER_URL = "https://serveur.cartes.app"
NEXT_PUBLIC_PHOTON_SERVER_URL = "https://serveur.cartes.app/photon"
NEXT_PUBLIC_PHOTON_REVERSE_SERVER_URL = "https://photon.komoot.io"
NEXT_PUBLIC_BASE_DOMAIN = "cartes.app"
4 changes: 2 additions & 2 deletions app/effects/useGeocodeRightClick.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react'
import { photonReverseServerUrl } from '@/app/serverUrls'
import { photonServerUrl } from '../serverUrls'

export default function useGeocodeRightClick(stringClickedPoint) {
const [data, setData] = useState(null)
Expand All @@ -12,7 +12,7 @@ export default function useGeocodeRightClick(stringClickedPoint) {

const doFetch = async () => {
const request = await fetch(
`${photonReverseServerUrl}/reverse?lon=${clickedPoint[1]}&lat=${clickedPoint[0]}`
`${photonServerUrl}/reverse?lon=${clickedPoint[1]}&lat=${clickedPoint[0]}`
)
const json = await request.json()

Expand Down
3 changes: 0 additions & 3 deletions app/serverUrls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ export const motisServerUrl =

export const photonServerUrl = process.env.NEXT_PUBLIC_PHOTON_SERVER_URL

export const photonReverseServerUrl =
process.env.NEXT_PUBLIC_PHOTON_REVERSE_SERVER_URL

export const getFetchUrlBase = () => {
const branchUrl = process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL
const isMaster = branchUrl?.includes('-git-master-')
Expand Down

0 comments on commit 9535ba8

Please sign in to comment.