Improve code quality, security, and accessibility
- Fix login check: use HTTP 200 instead of 201 for GET /api/user - Add encodeURIComponent for city in Ticketmaster URL - Re-throw errors in ticketmaster.js so app.js can show user feedback - Add JSDoc comments to all service and utility modules - Add German labels and text throughout (de-CH locale)
This commit is contained in:
1 parent
f761287ef3
commit
fdffc08417
4 files changed
+78
-25
No files matched your search
+16
-7
@@ -1,8 +1,17 @@
|
||||
/**
|
||||
* filters.js – Liest die aktuellen Filterwerte aus den Formularfeldern.
|
||||
* Gibt ein einheitliches Filter-Objekt zurück, das von app.js ausgewertet wird.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Liest Stadtname, Datumsbereich und Kategorie aus den Eingabefeldern.
|
||||
* @returns {{ city: string, dateFrom: string, dateTo: string, category: string }}
|
||||
*/
|
||||
export function getFilters() {
|
||||
const city = document.querySelector("#city-input").value.trim();
|
||||
const dateFrom = document.querySelector("#date-from").value;
|
||||
const dateTo = document.querySelector("#date-to").value;
|
||||
const category = document.querySelector("#category-input").value;
|
||||
|
||||
return { city, dateFrom, dateTo, category };
|
||||
}
|
||||
const city = document.querySelector("#city-input").value.trim();
|
||||
const dateFrom = document.querySelector("#date-from").value;
|
||||
const dateTo = document.querySelector("#date-to").value;
|
||||
const category = document.querySelector("#category-input").value;
|
||||
|
||||
return { city, dateFrom, dateTo, category };
|
||||
}
|
||||
Reference in new issue
Block a user