mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-04-19 12:19:33 +08:00
🐞 fix(subscriptions): negative usage flow
This commit is contained in:
parent
06d0c14abc
commit
bac04587b8
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.13.4",
|
"version": "2.13.5",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -66,8 +66,12 @@ async function getFlowInfo(req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// unit is KB
|
// unit is KB
|
||||||
const upload = Number(flowHeaders.match(/upload=(\d+)/)[1]);
|
const uploadMatch = flowHeaders.match(/upload=(-?)(\d+)/)
|
||||||
const download = Number(flowHeaders.match(/download=(\d+)/)[1]);
|
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]);
|
const total = Number(flowHeaders.match(/total=(\d+)/)[1]);
|
||||||
|
|
||||||
// optional expire timestamp
|
// optional expire timestamp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user