mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-17 05:43:36 +00:00
refactor(db): collapse repository rollout scaffolding into single factory
Repositories are now the only data path. Replaces the 41 current-*-repository wrapper files, the DATABASE_LAYER_REPOSITORY_ROLLOUT flag/alias map and the unused database/runtime adapter with repositories/factory.ts, a plain DatabaseContext type and an in-memory TestSqliteDatabase test harness.
This commit is contained in:
@@ -6,7 +6,7 @@ import { apiLogger } from "../../utils/logger.js";
|
||||
import { AuthManager } from "../../utils/auth-manager.js";
|
||||
import type { Request, Response } from "express";
|
||||
import { PermissionManager } from "../../utils/permission-manager.js";
|
||||
import { createCurrentSessionRecordingRepository } from "../repositories/current-session-recording-repository.js";
|
||||
import { createCurrentSessionRecordingRepository } from "../repositories/factory.js";
|
||||
import { getDb } from "../db/index.js";
|
||||
|
||||
const router = express.Router();
|
||||
@@ -29,8 +29,8 @@ function getRetentionDays(): number {
|
||||
10,
|
||||
);
|
||||
try {
|
||||
const row = getDb().$client
|
||||
.prepare(
|
||||
const row = getDb()
|
||||
.$client.prepare(
|
||||
"SELECT value FROM settings WHERE key = 'session_recording_retention_days'",
|
||||
)
|
||||
.get() as { value?: string } | undefined;
|
||||
|
||||
Reference in New Issue
Block a user