adding chat features, admin features and bug fixes

This commit is contained in:
Matthias Hochmeister
2026-03-12 08:16:34 +01:00
parent 7b14e3d5ba
commit 31f1414e06
43 changed files with 2610 additions and 16 deletions

View File

@@ -40,6 +40,24 @@ class BookStackController {
res.status(500).json({ success: false, message: 'BookStack-Suche fehlgeschlagen' });
}
}
async getPage(req: Request, res: Response): Promise<void> {
if (!environment.bookstack.url) {
res.status(200).json({ success: true, data: null, configured: false });
return;
}
const id = parseInt(String(req.params.id), 10);
if (isNaN(id) || id <= 0) {
res.status(400).json({ success: false, message: 'Ungültige Seiten-ID' });
return;
}
try {
const page = await bookstackService.getPageById(id);
res.status(200).json({ success: true, data: page, configured: true });
} catch (error) {
logger.error('BookStackController.getPage error', { error });
res.status(500).json({ success: false, message: 'BookStack-Seite konnte nicht geladen werden' });
}
}
}
export default new BookStackController();