From 8171105409452b4af81443c56b836cc7371a205d Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Fri, 4 Jul 2025 11:31:02 -0700 Subject: [PATCH] =?UTF-8?q?Geb=C3=A4ude-Query=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/_components/map/ContextMenu.tsx | 18 +++++----- apps/hub-server/routes/router.ts | 36 ------------------- 2 files changed, 9 insertions(+), 45 deletions(-) diff --git a/apps/dispatch/app/_components/map/ContextMenu.tsx b/apps/dispatch/app/_components/map/ContextMenu.tsx index e7a12067..a6ec697c 100644 --- a/apps/dispatch/app/_components/map/ContextMenu.tsx +++ b/apps/dispatch/app/_components/map/ContextMenu.tsx @@ -59,15 +59,15 @@ export const ContextMenu = () => { const addOSMobjects = async (ignorePreviosSelected?: boolean) => { const res = await fetch( `https://overpass-api.de/api/interpreter?data=${encodeURIComponent(` - [out:json]; - ( - way["leisure"~"pitch|sports_centre"](around:2000, ${contextMenu.lat}, ${contextMenu.lng}); - relation["leisure"~"pitch|sports_centre"](around:2000, ${contextMenu.lat}, ${contextMenu.lng}); - ); - out body; - >; - out skel qt; - `)}`, + [out:json]; + ( + way["building"](around:100, ${contextMenu.lat}, ${contextMenu.lng}); + relation["building"](around:100, ${contextMenu.lat}, ${contextMenu.lng}); + ); + out body; + >; + out skel qt; + `)}`, ); const data = await res.json(); diff --git a/apps/hub-server/routes/router.ts b/apps/hub-server/routes/router.ts index 09d3986b..8fa41cbe 100644 --- a/apps/hub-server/routes/router.ts +++ b/apps/hub-server/routes/router.ts @@ -8,41 +8,5 @@ const router: Router = Router(); router.use("/mail", mailRouter); router.use("/event", eventRouter); -router.get("/import", async (req, res) => { - await Promise.all( - DATA.map(async (station) => { - try { - return await prisma.station.create({ - data: { - aircraftRegistration: "D-H", - aircraft: station.aircraft, - aircraftSpeed: station.aircraftSpeed, - atcCallsign: station.atcCallsign, - bosCallsign: station.bosCallsign, - bosCallsignShort: station.bosCallsignShort, - bosRadioArea: station.bosRadioArea, - fir: station.fir, - operator: station.operator, - bosUse: "PRIMARY", - country: station.country as Country, - hasNvg: station.hasNvg, - hasRope: station.hasRope, - hasWinch: station.hasWinch, - is24h: station.is24h, - hideRangeRings: station.hideRangeRings, - locationState: station.locationState, - locationStateShort: station.locationStateShort, - - latitude: station.latitude, - longitude: station.longitude, - }, - }); - } catch (error) { - console.error(`Error creating station ${station.aircraft}:`, error); - } - }), - ); - res.status(200).json({ message: "Import completed" }); -}); export default router;