mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-24 13:56:39 +00:00
fix(bandwidth): use correct flipping and addition
This commit is contained in:
@@ -59,8 +59,8 @@ export const receiveBandwidth = async (
|
|||||||
await trx
|
await trx
|
||||||
.update(sites)
|
.update(sites)
|
||||||
.set({
|
.set({
|
||||||
megabytesIn: (site.megabytesIn || 0) + bytesIn,
|
megabytesOut: (site.megabytesOut || 0) + bytesIn,
|
||||||
megabytesOut: (site.megabytesOut || 0) + bytesOut,
|
megabytesIn: (site.megabytesIn || 0) + bytesOut,
|
||||||
lastBandwidthUpdate: new Date().toISOString(),
|
lastBandwidthUpdate: new Date().toISOString(),
|
||||||
online
|
online
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user