mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 22:45:46 +01:00
chore: eslint no-restricted-syntax
This commit is contained in:
committed by
Julian Lam
parent
115d19e289
commit
5c2f0f0557
@@ -128,13 +128,9 @@ Analytics.writeData = async function () {
|
||||
uniqueIPCount = 0;
|
||||
}
|
||||
|
||||
if (Object.keys(counters).length > 0) {
|
||||
for (const key in counters) {
|
||||
if (counters.hasOwnProperty(key)) {
|
||||
dbQueue.push(db.sortedSetIncrBy(`analytics:${key}`, counters[key], today.getTime()));
|
||||
delete counters[key];
|
||||
}
|
||||
}
|
||||
for (const [key, value] of Object.entries(counters)) {
|
||||
dbQueue.push(db.sortedSetIncrBy(`analytics:${key}`, value, today.getTime()));
|
||||
delete counters[key];
|
||||
}
|
||||
try {
|
||||
await Promise.all(dbQueue);
|
||||
|
||||
Reference in New Issue
Block a user