added different pages for editing

This commit is contained in:
Elmar Kresse
2023-10-17 21:07:15 +02:00
parent 0923d51b7e
commit 941e95f194
10 changed files with 354 additions and 75 deletions

View File

@@ -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;
}