Glossar: Eintraege bearbeitbar (PUT /api/glossary/:id + GUI-Editier-Flow)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0113vDKdSNtD3Dwcw4QMu9yV
This commit is contained in:
schakal00783
2026-07-16 23:55:27 +02:00
co-authored by Claude Fable 5
parent fdae4ce119
commit 1016eaa095
4 changed files with 43 additions and 6 deletions
+5
View File
@@ -52,6 +52,11 @@ export async function addGlossary(term, soundalikes) {
export async function deleteGlossary(id) {
await pool.execute('DELETE FROM glossary WHERE id=?', [id]);
}
export async function updateGlossary(id, term, soundalikes) {
await pool.execute('UPDATE glossary SET term=?, soundalikes=? WHERE id=?', [term, soundalikes || null, id]);
const [rows] = await pool.execute('SELECT id, term, soundalikes, enabled FROM glossary WHERE id=?', [id]);
return rows[0] ? { ...rows[0], enabled: !!rows[0].enabled } : null;
}
export async function addVoiceprint(name, vec) {
const [res] = await pool.execute(