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:
parent
a8acd7f4e1
commit
d3a6a14180
1 changed files with 5 additions and 4 deletions
|
@ -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++
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue