Added Editing of Questions

This commit is contained in:
2026-01-02 18:00:57 +01:00
parent 5568a5bb99
commit 48074f7603
23 changed files with 1095 additions and 71 deletions

View File

@@ -14,6 +14,7 @@
import Button from "./Button.svelte";
import Modal from "./Modal.svelte";
import Textfield from "./Textfield.svelte";
import { fetchCategory } from "../routes/editor/fetchers";
interface Props {
wall: Wall | FullWall | undefined;
@@ -40,15 +41,7 @@
if (wall && isWall(wall)) {
let cats: Promise<Category>[] = [];
for (const catId of wall.categories) {
cats.push(
axios
.get(url(`/category?id=${catId}`), { withCredentials: true })
.then((response) => {
if (response.status === 200) {
return response.data;
} else throw "Failed to fetch: " + response.status;
})
);
cats.push(fetchCategory(catId));
}
return Promise.all(cats).then((cats) => {
categories = cats;