Skip to content

Commit

Permalink
fix file paths in container
Browse files Browse the repository at this point in the history
  • Loading branch information
hambsch committed Jun 26, 2024
1 parent a8710eb commit e3a55d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/guppy/routes/admin_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def upload_file(layer_name: str, db: Session = Depends(get_db)):

@router.get("/upload/ui", description="simple UI to upload a file (GeoTiff or Gpkg) to the server.")
def read_index():
with open(f'{cfg.deploy.path}/html/upload.html', 'r', encoding='utf-8') as file:
with open(f'guppy/html/upload.html', 'r', encoding='utf-8') as file:
file_content = file.read()

file_content = file_content.replace('$deploy_path$', cfg.deploy.path)
Expand All @@ -34,7 +34,7 @@ def read_index():

@router.get("/layers", description="layers")
def read_index():
with open(f'{cfg.deploy.path}/html/layers.html', 'r', encoding='utf-8') as file:
with open(f'guppy/html/layers.html', 'r', encoding='utf-8') as file:
file_content = file.read()

file_content = file_content.replace('$deploy_path$', cfg.deploy.path)
Expand All @@ -43,7 +43,7 @@ def read_index():

@router.get("/stats", description="stats")
def read_index():
with open(f'{cfg.deploy.path}/html/statistics.html', 'r', encoding='utf-8') as file:
with open(f'guppy/html/statistics.html', 'r', encoding='utf-8') as file:
file_content = file.read()

file_content = file_content.replace('$deploy_path$', cfg.deploy.path)
Expand Down Expand Up @@ -83,7 +83,7 @@ def get_tilestatsgpkg(layerName: str, db: Session = Depends(get_db)):

@router.get("/map", description="map")
def read_index():
with open(f'{cfg.deploy.path}/html/map.html', 'r', encoding='utf-8') as file:
with open(f'guppy/html/map.html', 'r', encoding='utf-8') as file:
file_content = file.read()

file_content = file_content.replace('$deploy_path$', cfg.deploy.path)
Expand Down

0 comments on commit e3a55d4

Please sign in to comment.