Skip to content

Commit 9c5d6e9

Browse files
committed
feat: 单条订阅和文件支持链接参数 produceType raw, 此时返回原始数据的数组
1 parent ef2d6be commit 9c5d6e9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.19.46",
3+
"version": "2.19.47",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"scripts": {

backend/src/restful/sync.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ async function produceArtifact({
174174
}
175175
}
176176
if (produceType === 'raw') {
177-
return (Array.isArray(raw) ? raw : [raw]).flat();
177+
return JSON.stringify((Array.isArray(raw) ? raw : [raw]).flat());
178178
}
179179
// parse proxies
180180
let proxies = (Array.isArray(raw) ? raw : [raw])
@@ -574,7 +574,7 @@ async function produceArtifact({
574574
}
575575
}
576576
if (produceType === 'raw') {
577-
return (Array.isArray(raw) ? raw : [raw]).flat();
577+
return JSON.stringify((Array.isArray(raw) ? raw : [raw]).flat());
578578
}
579579
const files = (Array.isArray(raw) ? raw : [raw]).flat();
580580
let filesContent = files

0 commit comments

Comments
 (0)