mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-17 19:45:36 -04:00
12 lines
418 B
TypeScript
12 lines
418 B
TypeScript
import { getLocale, loadConfig } from '~~/server/data.ts';
|
|
import { getNameEntries } from '~~/server/names.ts';
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const locale = getLocale(event);
|
|
checkIsConfigEnabledOr404(await loadConfig(locale), 'names');
|
|
|
|
const { isGranted } = await useAuthentication(event);
|
|
const db = useDatabase();
|
|
return await getNameEntries(db, isGranted, locale);
|
|
});
|