mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-07 10:43:16 +08:00
🐞 fix(subscriptions): negative usage flow (#175)
This commit is contained in:
@@ -66,8 +66,12 @@ async function getFlowInfo(req, res) {
|
||||
}
|
||||
|
||||
// unit is KB
|
||||
const upload = Number(flowHeaders.match(/upload=(\d+)/)[1]);
|
||||
const download = Number(flowHeaders.match(/download=(\d+)/)[1]);
|
||||
const uploadMatch = flowHeaders.match(/upload=(-?)(\d+)/)
|
||||
const upload = Number(uploadMatch[1] + uploadMatch[2]);
|
||||
|
||||
const downloadMatch = flowHeaders.match(/download=(-?)(\d+)/)
|
||||
const download = Number(downloadMatch[1] + downloadMatch[2]);
|
||||
|
||||
const total = Number(flowHeaders.match(/total=(\d+)/)[1]);
|
||||
|
||||
// optional expire timestamp
|
||||
|
||||
Reference in New Issue
Block a user