965cbff8ff
* 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
11 lines
447 B
TypeScript
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();
|
|
});
|