mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-28 15:31:11 -04:00
12 lines
426 B
TypeScript
12 lines
426 B
TypeScript
import { getLocale, loadConfig } from '~~/server/data.ts';
|
|
import { getTermsEntries } from '~~/server/terms.ts';
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const locale = getLocale(event);
|
|
checkIsConfigEnabledOr404(await loadConfig(locale), 'terminology');
|
|
|
|
const { isGranted } = await useAuthentication(event);
|
|
const db = useDatabase();
|
|
return await getTermsEntries(db, isGranted, locale);
|
|
});
|