mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-27 06:52:35 -04:00
12 lines
436 B
TypeScript
12 lines
436 B
TypeScript
import { getLocale, loadConfig } from '~~/server/data.ts';
|
|
import { getInclusiveEntries } from '~~/server/inclusive.ts';
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const locale = getLocale(event);
|
|
checkIsConfigEnabledOr404(await loadConfig(locale), 'inclusive');
|
|
|
|
const { isGranted } = await useAuthentication(event);
|
|
const db = useDatabase();
|
|
return await getInclusiveEntries(db, isGranted, locale);
|
|
});
|