mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
ids stat structure change
This commit is contained in:
@@ -59,16 +59,17 @@ function LogId (id, subj) {
|
||||
}
|
||||
|
||||
function AddSubjToList (list, subj) {
|
||||
if (list.indexOf(subj) === -1) {
|
||||
list.push(subj)
|
||||
if (!list[subj]) {
|
||||
list[subj] = 0
|
||||
}
|
||||
list[subj]++
|
||||
}
|
||||
|
||||
function Inc (value, subj) {
|
||||
if (data[value] === undefined) {
|
||||
data[value] = {
|
||||
count: 0,
|
||||
subjs: []
|
||||
subjs: {}
|
||||
}
|
||||
}
|
||||
data[value].count++
|
||||
@@ -82,7 +83,7 @@ function AddVisitStat (name, subj) {
|
||||
if (vData[now][name] === undefined) {
|
||||
vData[now][name] = {
|
||||
count: 0,
|
||||
subjs: []
|
||||
subjs: {}
|
||||
}
|
||||
}
|
||||
vData[now][name].count++
|
||||
|
Reference in New Issue
Block a user