Scripts: fix server

This commit is contained in:
Pieter Vander Vennet 2025-09-26 02:32:09 +02:00
parent 587f51f6c0
commit 8200b3b77c

View file

@ -37,8 +37,7 @@ class ServerPmTileExtracts extends Script {
body: string,
res: ServerResponse) => {
const [z,x,y] = path.split(".")[0].split("/").map(x => Number(x))
const maxzoom = zoomlevels[z]
if(!maxzoom){
if(z in zoomlevels){
throw "Invalid zoomlevel, must be one of "+Array.from(Object.keys(zoomlevels)).join(", ")
}