Hub 2.24.0: update everything at a church to latest
A customer's Sites card has "Update everything to latest": every product that's behind, in one batch (Accounts first, one at a time, stopping at the first failure), scheduled or as an emergency, planned whole or not at all. Later products keep Accounts at the version the batch updates it to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -293,6 +293,17 @@ router.post('/updates', wrap(async (req, res) => {
|
||||
res.status(201).json(out);
|
||||
}));
|
||||
|
||||
// Hub 2.24.0: a whole church (customer) to the latest release of each product, in one batch.
|
||||
router.get('/customers/:id/update-plan', wrap(async (req, res) => {
|
||||
res.json({ products: await jobs.churchUpdatePlan(req.params.id) });
|
||||
}));
|
||||
|
||||
router.post('/customers/:id/update-all', wrap(async (req, res) => {
|
||||
const out = await jobs.scheduleChurchUpdate(req.params.id, req.body || {}, req.admin);
|
||||
await audit(req, req.body?.emergency ? 'emergency_church_update_scheduled' : 'church_update_scheduled', out.batchId, { customerId: req.params.id, updates: out.updates, at: req.body?.asap ? 'as soon as possible' : req.body?.at, reason: req.body?.reason || null, ...(req.body?.confirmLive ? { duringLiveEvent: true } : {}) });
|
||||
res.status(201).json(out);
|
||||
}));
|
||||
|
||||
// ─── Jobs ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
// Hub 2.6.0: paged (?page, ?pageSize), with filters for every status (succeeded too), a job type,
|
||||
|
||||
Reference in New Issue
Block a user