Skip to content

Commit

Permalink
display record ip, not record viewer ip (#34)
Browse files Browse the repository at this point in the history
* display record ip, not record viewer ip

* correct field name
  • Loading branch information
neonphog authored Jul 25, 2024
1 parent 4de593c commit dfea29a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ts/sbd-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default {
let opened = 0;
let active = 0;
let activeBytesReceived = 0;
let recIp = 'no-ip';

if (
'op' in item.metadata &&
Expand All @@ -76,6 +77,12 @@ export default {
) {
activeBytesReceived = item.metadata.br;
}
if (
'ip' in item.metadata &&
typeof item.metadata.ip === 'string'
) {
recIp = item.metadata.ip;
}

const now = common.timestamp();

Expand All @@ -92,7 +99,7 @@ export default {
openedD,
active,
activeD,
ip,
ip: recIp,
},
activeBytesReceived,
);
Expand Down

0 comments on commit dfea29a

Please sign in to comment.