audit logic

This commit is contained in:
2026-01-26 20:39:23 -06:00
parent 196f7a53b3
commit 6b9f6810ab
10 changed files with 5033 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import roleRoutes from './role.routes';
import ttsRoutes from './tts.routes';
import readingRoutes from './reading.routes';
import bulkUploadRoutes from './bulk-upload.routes';
import auditRoutes from './audit.routes';
// Create main router
const router = Router();
@@ -130,4 +131,14 @@ router.use('/readings', readingRoutes);
*/
router.use('/bulk-upload', bulkUploadRoutes);
/**
* Audit routes:
* - GET /audit-logs - List all audit logs (admin only)
* - GET /audit-logs/my-activity - Get current user's activity
* - GET /audit-logs/statistics - Get audit statistics (admin only)
* - GET /audit-logs/:id - Get audit log by ID (admin only)
* - GET /audit-logs/record/:tableName/:recordId - Get logs for specific record (admin only)
*/
router.use('/audit-logs', auditRoutes);
export default router;