feat: add search

This commit is contained in:
gosangam
2026-05-10 20:41:58 +05:30
parent 4cbb146bc1
commit 09fbcf93ed
9 changed files with 1012 additions and 6 deletions
+13 -1
View File
@@ -397,5 +397,17 @@ export async function getProseChapter(
* Get all glossary entries, ordered alphabetically by term.
*/
export async function getAllGlossaryEntries(): Promise<GlossaryRecord[]> {
return bffList<GlossaryRecord>("/glossary", { tags: ["glossary"] });
const raw = await bffList<{
id: string;
term: string;
definition: string;
definition_html: string;
}>("/glossary", { tags: ["glossary"] });
return raw.map((entry) => ({
id: entry.id,
term: entry.term,
definition: entry.definition,
definitionHtml: entry.definition_html ?? entry.definition,
}));
}