From 9ae70eca0903e0189986e5dfa7e7fa057c8f0808 Mon Sep 17 00:00:00 2001 From: xream Date: Fri, 12 Jan 2024 03:52:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=8C=E6=AD=A5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/restful/sync.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 558551d..a610d4b 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.144", + "version": "2.14.145", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/restful/sync.js b/backend/src/restful/sync.js index ec647db..05a14c5 100644 --- a/backend/src/restful/sync.js +++ b/backend/src/restful/sync.js @@ -4,6 +4,7 @@ import { COLLECTIONS_KEY, RULES_KEY, SUBS_KEY, + FILES_KEY, } from '@/constants'; import { failed, success } from '@/restful/response'; import { InternalServerError, ResourceNotFoundError } from '@/restful/errors'; @@ -327,6 +328,10 @@ async function produceArtifact({ ]); // produce output return RuleUtils.produce(rules, platform); + } else if (type === 'file') { + const allFiles = $.read(FILES_KEY); + const file = findByName(allFiles, name); + return file?.content ?? ''; } }