diff --git a/src/lib/server/api.ts b/src/lib/server/api.ts index 423b7f7..baede5c 100644 --- a/src/lib/server/api.ts +++ b/src/lib/server/api.ts @@ -488,7 +488,7 @@ function notesCreate( const user = requireAuth(db, args.token); const topicId = args.topicId?.trim() ?? ""; const unitId = args.unitId?.trim() ?? ""; - if (!topicId && !unitId) throw new Error("Select a topic or a unit"); + if (!unitId) throw new Error("Select a unit"); const id = newId(); const now = Date.now(); db.exec("BEGIN"); @@ -597,7 +597,7 @@ function questionsCreate( const user = requireAuth(db, args.token); const topicId = args.topicId?.trim() ?? ""; const unitId = args.unitId?.trim() ?? ""; - if (!topicId && !unitId) throw new Error("Select a topic or a unit"); + if (!unitId) throw new Error("Select a unit"); const id = newId(); const now = Date.now(); db.exec("BEGIN"); diff --git a/src/routes/admin/+page.svelte b/src/routes/admin/+page.svelte index 236546d..7a3945d 100644 --- a/src/routes/admin/+page.svelte +++ b/src/routes/admin/+page.svelte @@ -471,14 +471,18 @@ {/if} {:else} -
Admin