From 8090d678ee9e976e5ec29503907330221f626037 Mon Sep 17 00:00:00 2001 From: xream Date: Sun, 29 Dec 2024 22:08:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=86=E4=BA=AB=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=A4=9A=E4=B8=80=E7=BA=A7=E8=B7=AF=E7=94=B1=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E7=9B=AE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/restful/download.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 8fb8ee729..a57f46ceb 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.15.9", + "version": "2.15.10", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/restful/download.js b/backend/src/restful/download.js index a57dd8ec5..72bbeb03d 100644 --- a/backend/src/restful/download.js +++ b/backend/src/restful/download.js @@ -13,7 +13,17 @@ import { getISO } from '@/utils/geo'; import env from '@/utils/env'; export default function register($app) { + $app.get('/share/col/:name/:target', async (req, res) => { + req.query.target = req.params.target; + $.info(`使用路由指定目标: ${req.params.target}`); + await downloadCollection(req, res); + }); $app.get('/share/col/:name', downloadCollection); + $app.get('/share/sub/:name/:target', async (req, res) => { + req.query.target = req.params.target; + $.info(`使用路由指定目标: ${req.params.target}`); + await downloadSubscription(req, res); + }); $app.get('/share/sub/:name', downloadSubscription); $app.get('/download/collection/:name/:target', async (req, res) => {