Archived
Site settings -> Licence sends a signed update request to the Hub (docs/hub-protocol.md 3a) instead of showing bash scripts/deploy.sh. Shows "Update requested" until the site runs that version and hides the update banner meanwhile. Audit-logged as hub_update_requested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
643 B
JavaScript
14 lines
643 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const { getStatus, connect, heartbeatNow, requestUpdate } = require('../controllers/hubController');
|
|
const { protect, admin } = require('../middleware/authMiddleware');
|
|
|
|
// Licence and the Cross Events Hub (docs/hub-protocol.md). Admins only; the setup wizard's
|
|
// admin token counts, so the licence step can run during /setup.
|
|
router.get('/status', protect, admin, getStatus);
|
|
router.post('/connect', protect, admin, connect);
|
|
router.post('/heartbeat', protect, admin, heartbeatNow);
|
|
router.post('/update-request', protect, admin, requestUpdate);
|
|
|
|
module.exports = router;
|