mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-04 02:39:14 +02:00
added different pages for editing
This commit is contained in:
@@ -18,3 +18,21 @@ export async function createIndividualFeed(modules: Module[]): Promise<string> {
|
||||
});
|
||||
return token;
|
||||
}
|
||||
|
||||
export async function saveIndividualFeed(token: string, modules: Module[]): Promise<string> {
|
||||
|
||||
await fetch("/api/collections/feeds/records/" + token, {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: "{\"modules\":" + JSON.stringify(modules) + "}",
|
||||
})
|
||||
.then((response) => {
|
||||
return response.json();
|
||||
})
|
||||
.then((response) => {
|
||||
token = response;
|
||||
});
|
||||
return token;
|
||||
}
|
||||
|
Reference in New Issue
Block a user