feat: initialize lastPeriodicInformAt on BOOTSTRAP too
This commit is contained in:
1 parent
d9b3a1b810
commit
670ed860aa
1 file changed
+2
-1
@@ -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(() => {})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user