You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
525 B
14 lines
525 B
import { KNOWN_CONFIG_KEYS, KnownConfigKey, KnownConfigValue } from "#server/service/config/registry";
|
|
|
|
export default defineWrappedResponseHandler(async (event) => {
|
|
const entries = await Promise.all(
|
|
KNOWN_CONFIG_KEYS.map(async (key) => {
|
|
const value = await event.context.config.getGlobal(key);
|
|
return [key, value] as const satisfies [KnownConfigKey, KnownConfigValue<KnownConfigKey>];
|
|
}),
|
|
);
|
|
|
|
return R.success({
|
|
config: Object.fromEntries(entries),
|
|
});
|
|
});
|
|
|