Timed jobs move from in-process timers to a job registry run by pg-boss: once per schedule across processes, retries, run history, cron schedules in the church timezone, and an admin Background jobs page with Run now. Playwright end-to-end tests run against their own seeded database. A Gitea Actions workflow runs backend tests, frontend checks and the e2e tests, and deploys v* tags with scripts/deploy.sh once secrets are set. Also fixes the at-the-door check-in count for multi-day tickets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
1.0 KiB
JavaScript
19 lines
1.0 KiB
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const { listAuditLog } = require('../controllers/adminAuditController');
|
|
const { startImpersonation, endImpersonation, logPageView, currentImpersonation, listSessions } = require('../controllers/impersonationController');
|
|
const { listJobs, runJobNow } = require('../controllers/jobsController');
|
|
const { protect, admin } = require('../middleware/authMiddleware');
|
|
|
|
router.get('/audit-log', protect, admin, listAuditLog);
|
|
router.get('/jobs', protect, admin, listJobs);
|
|
router.post('/jobs/:name/run', protect, admin, runJobNow);
|
|
router.get('/impersonation-sessions', protect, admin, listSessions);
|
|
// Called with the impersonation token itself (which belongs to the viewed user).
|
|
router.post('/impersonate/end', protect, endImpersonation);
|
|
router.post('/impersonate/log', protect, logPageView);
|
|
router.get('/impersonate/current', protect, currentImpersonation);
|
|
router.post('/impersonate/:userId', protect, admin, startImpersonation);
|
|
|
|
module.exports = router;
|