Banners reach a site the Hub installed
Found in the VM test: a Hub-installed site registers with its licence key, but its deployment was never linked to that registration, so update and closing banners were silently skipped. Registration now makes the link, and a notice makes it for sites that registered before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls1vMdni7EfytGYqQTprME
This commit is contained in:
@@ -152,6 +152,9 @@ router.post('/installs/register', registerLimiter, async (req, res) => {
|
||||
? await prisma.install.update({ where: { id: licence.install.id }, data })
|
||||
: await prisma.install.create({ data: { ...data, product: licence.product, customerId: licence.customerId, licenceId: licence.id } });
|
||||
await prisma.installEvent.create({ data: { installId: install.id, type: 'registered', level: 'info', message: `${licence.install ? 'Re-registered' : 'Registered'} from ${url} (version ${install.version || '?'})`, resolvedAt: new Date() } });
|
||||
// A site the Hub installed (Servers → New install) is linked to its registration, so its
|
||||
// update and closing banners reach it (found in the VM test: they never did).
|
||||
await prisma.deployment.updateMany({ where: { licenceId: licence.id, installId: null }, data: { installId: install.id } }).catch(() => {});
|
||||
|
||||
res.status(201).json({
|
||||
installId: install.id,
|
||||
|
||||
Reference in New Issue
Block a user