mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-14 06:39:08 +02:00
Merge pull request #419 from hareland/fix-bandwidth
fix(bandwidth): Record correct megaBytesIn/megaBytesOut
This commit is contained in:
commit
4be1d87602
1 changed files with 2 additions and 2 deletions
|
@ -59,8 +59,8 @@ export const receiveBandwidth = async (
|
||||||
await trx
|
await trx
|
||||||
.update(sites)
|
.update(sites)
|
||||||
.set({
|
.set({
|
||||||
megabytesOut: (site.megabytesIn || 0) + bytesIn,
|
megabytesOut: (site.megabytesOut || 0) + bytesIn,
|
||||||
megabytesIn: (site.megabytesOut || 0) + bytesOut,
|
megabytesIn: (site.megabytesIn || 0) + bytesOut,
|
||||||
lastBandwidthUpdate: new Date().toISOString(),
|
lastBandwidthUpdate: new Date().toISOString(),
|
||||||
online
|
online
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue