added image and audio REST endpoints

This commit is contained in:
Florian Zumpe
2026-06-16 23:52:37 +02:00
parent b910bce8df
commit c98f304ffa
13 changed files with 1126 additions and 494 deletions
+3 -1
View File
@@ -6,6 +6,8 @@
ns.Api = {
health: () => request('/health'),
routes: position => request('/routes' + (position ? `?lat=${encodeURIComponent(position.lat)}&lon=${encodeURIComponent(position.lon)}&radiusKm=${ns.Config.routeRadiusKm}` : '')),
route: id => request(`/routes/${encodeURIComponent(id)}`)
route: id => request(`/routes/${encodeURIComponent(id)}`),
pictureUrl: (routeId, pictureId) => `${ns.Config.apiBase}/routes/${encodeURIComponent(routeId)}/pictures/${encodeURIComponent(pictureId)}`,
audioUrl: (routeId, poiId) => `${ns.Config.apiBase}/routes/${encodeURIComponent(routeId)}/audio?poiId=${encodeURIComponent(poiId)}`
};
}(window.Wegwichtel, window.jQuery));