This commit is contained in:
Martin Slachta
2026-06-11 19:03:29 +02:00
commit 0d829845c4
150 changed files with 38582 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
const RsvTimetableService = {
get_all() {
return fetch(get_rest_url('timetable'), { method: 'GET' })
.then(r => {
if (!r.ok) throw new Error(`fetch timetables failed: ${r.status}`);
return r.json();
});
},
get_availability_for_date(timetable_id, date) {
const params = new URLSearchParams({
date: date.toISOString().slice(0, 10),
});
return fetch(get_rest_url(`timetable/${timetable_id}/availability?${params}`), { method: 'GET' })
.then(r => {
if (!r.ok) throw new Error(`fetch availability failed: ${r.status}`);
return r.json();
});
}
}