Files
drop/server/api/v1/settings/index.get.ts
T
Paco 965cbff8ff Make application and logo configurable (#336)
* Adds settings for server name and logo

* Implements ApplicationLogo and replaces site name based on settings

* Refactors component for changing the company logo

* Removes unused variable

* Uses message instead of statusMessage

* Replaces favicon with logo if set
2026-02-06 11:43:21 +11:00

11 lines
447 B
TypeScript

import aclManager from "~/server/internal/acls";
import { applicationSettings } from "~/server/internal/config/application-configuration";
import type { Settings } from "~/server/internal/utils/types";
export default defineEventHandler(async (h3): Promise<Settings> => {
const allowed = await aclManager.getUserACL(h3, ["settings:read"]);
if (!allowed) throw createError({ statusCode: 403 });
return applicationSettings.getSettings();
});