added page and edit backend for edit calendar by token

This commit is contained in:
masterelmar
2023-10-17 11:01:26 +02:00
parent 01e32448c9
commit 0923d51b7e
11 changed files with 512 additions and 4 deletions

View File

@ -0,0 +1,16 @@
import { Module } from "../model/module";
import { Calendar } from "../model/calendar";
export async function getCalender( token: string): Promise<Module[]> {
const request = new Request("/api/collections/feeds/records/" + token, {
method: "GET",
});
return await fetch(request)
.then((response) => {
return response.json();
})
.then(
(calendarResponse: Calendar) => calendarResponse.modules
);
}