fix(bandwidth): use correct flipping and addition

This commit is contained in:
hareland 2025-03-28 14:54:37 +01:00
parent 3442942893
commit 131df8aeb7

View file

@ -59,8 +59,8 @@ export const receiveBandwidth = async (
await trx
.update(sites)
.set({
megabytesIn: (site.megabytesIn || 0) + bytesIn,
megabytesOut: (site.megabytesOut || 0) + bytesOut,
megabytesOut: (site.megabytesOut || 0) + bytesIn,
megabytesIn: (site.megabytesIn || 0) + bytesOut,
lastBandwidthUpdate: new Date().toISOString(),
online
})