From 3292dd7552c38d2af1f008eae8a19ea560723df7 Mon Sep 17 00:00:00 2001 From: mike Date: Sat, 1 Aug 2026 00:10:29 +0800 Subject: [PATCH] Update storage.js via upload script - 2026-08-01 00:10:08 --- storage.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/storage.js b/storage.js index 76f1983..e14fa7e 100644 --- a/storage.js +++ b/storage.js @@ -207,16 +207,3 @@ export async function checkJmsLine(line) { if (!res.ok) throw new Error(data.error || 'check failed'); return data; // { status: 'normal' | 'abnormal', checkedAt } } - -// 让服务器代为请求JMS的标准订阅地址,解析Subscription-Userinfo拿到流量信息 -// (浏览器直接fetch会被CORS挡住,服务器端没有这个限制) -export async function fetchJmsTraffic(subscriptionUrl) { - const res = await fetch('/api/jms/fetch-traffic', { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ subscriptionUrl }), - }); - const data = await res.json().catch(() => ({})); - if (!res.ok) throw new Error(data.error || 'fetch traffic failed'); - return data; // { ok, upload, download, total, expire } 或 { ok:false, error } -}