2025-12-11 10:40:55 +01:00
|
|
|
/*
|
2026-01-12 15:00:36 +01:00
|
|
|
* Copyright (c) 2026 by Christian Kellner.
|
2025-12-11 10:40:55 +01:00
|
|
|
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2024-11-22 09:11:10 +01:00
|
|
|
import restana from 'restana';
|
2025-12-09 13:56:46 +01:00
|
|
|
import { getSettings } from '../../services/storage/settingsStorage.js';
|
2024-11-22 09:11:10 +01:00
|
|
|
const service = restana();
|
|
|
|
|
const demoRouter = service.newRouter();
|
|
|
|
|
|
|
|
|
|
demoRouter.get('/', async (req, res) => {
|
2025-12-09 13:56:46 +01:00
|
|
|
const settings = await getSettings();
|
|
|
|
|
res.body = Object.assign({}, { demoMode: settings.demoMode });
|
2024-11-22 09:11:10 +01:00
|
|
|
res.send();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export { demoRouter };
|