feat: initialize lastPeriodicInformAt on BOOTSTRAP too

This commit is contained in:
Kevin L'Hereec committed 2026-06-02 18:16:16 +02:00
1 parent d9b3a1b810
commit 670ed860aa
1 file changed
+2 -1
+2 -1
View File
@@ -175,7 +175,8 @@ export default class CwmpController {
// Track last periodic inform timestamp
const isPeriodic = events.some((e) => String(e).toUpperCase().includes('PERIODIC') || String(e) === '2')
if (isPeriodic) {
const isBootstrap = events.some((e) => String(e).toUpperCase().includes('BOOTSTRAP') || String(e) === '0')
if (isPeriodic || isBootstrap) {
await DeviceModel.updateOne({ identifier: hashId }, { $set: { lastPeriodicInformAt: new Date() } }).catch(() => {})
}