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) {
|
function AddSubjToList (list, subj) {
|
||||||
if (list.indexOf(subj) === -1) {
|
if (!list[subj]) {
|
||||||
list.push(subj)
|
list[subj] = 0
|
||||||
}
|
}
|
||||||
|
list[subj]++
|
||||||
}
|
}
|
||||||
|
|
||||||
function Inc (value, subj) {
|
function Inc (value, subj) {
|
||||||
if (data[value] === undefined) {
|
if (data[value] === undefined) {
|
||||||
data[value] = {
|
data[value] = {
|
||||||
count: 0,
|
count: 0,
|
||||||
subjs: []
|
subjs: {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data[value].count++
|
data[value].count++
|
||||||
@@ -82,7 +83,7 @@ function AddVisitStat (name, subj) {
|
|||||||
if (vData[now][name] === undefined) {
|
if (vData[now][name] === undefined) {
|
||||||
vData[now][name] = {
|
vData[now][name] = {
|
||||||
count: 0,
|
count: 0,
|
||||||
subjs: []
|
subjs: {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vData[now][name].count++
|
vData[now][name].count++
|
||||||
|
Reference in New Issue
Block a user