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 ?? ''; } }