addition of new dashboard

This commit is contained in:
2026-08-20 15:08:32 +00:00
parent 0622018d95
commit bf59249ed7
161 changed files with 13170 additions and 119 deletions

24
backend/apps.js Normal file
View File

@@ -0,0 +1,24 @@
import { getConfig } from "./common/config.js";
import { watchAudits } from "./common/queue.js";
import { getPool } from "./db/index.js";
export async function loadApps() {
const config = getConfig();
const client = await getPool();
for (const type in config.appModules) {
// Internal modules (e.g. dashboard) have no `app` row / API surface.
if (config.appModules[type]?.internal) continue;
await client.query(`
INSERT INTO public.app (
type
) VALUES (
$1
) ON CONFLICT DO NOTHING;
`, [
type,
]);
if (type === 'core')
watchAudits();
}
await client.release();
}