Files
fredy/lib/api/routes/demoRouter.js
2026-04-27 16:56:04 +02:00

17 lines
446 B
JavaScript

/*
* Copyright (c) 2026 by Christian Kellner.
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
*/
import { getSettings } from '../../services/storage/settingsStorage.js';
/**
* @param {import('fastify').FastifyInstance} fastify
*/
export default async function demoPlugin(fastify) {
fastify.get('/', async () => {
const settings = await getSettings();
return { demoMode: settings.demoMode };
});
}