v2: CRUD-модуль — /v2/app с выбором компании, добавление/изменение/удаление записей

This commit is contained in:
2026-06-12 16:53:33 +04:00
parent 03d480de12
commit e91f1b0ff3
7 changed files with 612 additions and 1 deletions
+4
View File
@@ -8,6 +8,7 @@
const express = require('express');
const config = require('./src/config');
const auth = require('./src/auth');
const crud = require('./src/crud');
const oidcConfig = {
baseUrl: config.kcBaseUrl,
@@ -102,6 +103,9 @@ ${u.isImpersonated ? `<p style="background:#ffc107;color:#000;padding:5px;">⚠
}
});
// ── CRUD (/v2/app) ────────────────────────────────────────────
router.use('/app', crud.createCrudRouter());
// ── GET /v2/logout ───────────────────────────────────────────────────────
router.get('/logout', (req, res) => {
delete req.session.v2_user;