Sfoglia il codice sorgente

Swap in and out bytes

Owen Schwartz 7 mesi fa
parent
commit
a16e4e2e74
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      server/routers/gerbil/receiveBandwidth.ts

+ 2 - 2
server/routers/gerbil/receiveBandwidth.ts

@@ -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) + bytesOut,
+                        megabytesOut: (site.megabytesIn || 0) + bytesIn,
+                        megabytesIn: (site.megabytesOut || 0) + bytesOut,
                         lastBandwidthUpdate: new Date().toISOString(),
                         lastBandwidthUpdate: new Date().toISOString(),
                         online
                         online
                     })
                     })