mirror of
http://100.103.83.12:3003/fegger/time_to_leave.git
synced 2026-09-17 09:42:44 +00:00
Revamp branding, UI styling, and HAFAS integration
- Update BRAND_GUIDELINES.md with new melting clock logo concept - Rebrand UI components with new violet-to-pink gradient color scheme - Implement HAFAS authentication headers and GET support in route - Update logo SVGs to match new brand guidelines - Fix HAFAS time format to exclude millisecond padding - Update default station to Mödling Bahnhof - Bump workspace package versions to 1.0.0
This commit is contained in:
@@ -35,7 +35,8 @@ export class ApiClient {
|
||||
const url = buildUrl(this.baseUrl, "/api/geocode", params);
|
||||
const res = await fetch(url);
|
||||
if (!res.ok) throw new Error(`Geocode failed: ${res.status}`);
|
||||
return res.json();
|
||||
const result: GeocodeResult = await res.json();
|
||||
return [result];
|
||||
}
|
||||
|
||||
async getBikeRoute(
|
||||
@@ -93,12 +94,19 @@ export class ApiClient {
|
||||
toStationExtId: string,
|
||||
date: Date,
|
||||
): Promise<Journey[]> {
|
||||
const url = buildUrl(this.baseUrl, "/api/hafas", {
|
||||
// Use POST request as per the new implementation
|
||||
const body = {
|
||||
from: fromStationExtId,
|
||||
to: toStationExtId,
|
||||
date: date.toISOString(),
|
||||
};
|
||||
|
||||
const res = await fetch(`${this.baseUrl}/api/hafas`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(body)
|
||||
});
|
||||
const res = await fetch(url);
|
||||
|
||||
if (!res.ok) throw new Error(`Journey search failed: ${res.status}`);
|
||||
return res.json();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user