correct elevation for summit logs

This commit is contained in:
Christian Beutel
2025-08-20 13:34:55 +02:00
parent e3916e371a
commit 097ecd409d
6 changed files with 19 additions and 14 deletions

View File

@@ -21,7 +21,7 @@ export async function PUT(event: RequestEvent) {
}
let parseResult: { trail: Trail, gpx: GPX };
try {
parseResult = gpx2trail(gpxData, data.get("name") as string | undefined, event.fetch);
parseResult = await gpx2trail(gpxData, data.get("name") as string | undefined, true, event.fetch);
} catch (e: any) {
console.error(e)
throw new ClientResponseError({ status: 400, response: { message: "Invalid file" } })

View File

@@ -319,7 +319,7 @@
try {
const prevId = $formData.id;
const parseResult = gpx2trail(gpxData, selectedFile.name);
const parseResult = await gpx2trail(gpxData, selectedFile.name);
setFields(parseResult.trail);
$formData.id = prevId ?? cryptoRandomString({ length: 15 });
$formData.expand!.gpx_data = gpxData;