treewide: make less webhook-centric

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ifab58fcb523549ca9cb83dc8467be51e6a6a6964
This commit is contained in:
raf 2026-02-01 14:38:58 +03:00
commit 374408834b
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
9 changed files with 479 additions and 39 deletions

View file

@ -9,8 +9,7 @@ export function createDashboardRouter(config: Config): express.Router {
router.use(express.json());
// --- API routes ---
// API routes
router.get('/api/status', (_req, res) => {
const enabledBackends = Object.entries(config.engine.backends)
.filter(([, v]) => v.enabled)
@ -41,7 +40,10 @@ export function createDashboardRouter(config: Config): express.Router {
router.put('/api/config', (req, res) => {
try {
const partial = req.body as Partial<Config>;
const merged = deepMerge(config as Record<string, unknown>, partial as Record<string, unknown>) as Config;
const merged = deepMerge(
config as Record<string, unknown>,
partial as Record<string, unknown>
) as Config;
validate(merged);
// Apply in-place