Skip to content

Commit

Permalink
feat: 正式弃用旧的 subName 和 collectionName
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Sep 18, 2024
1 parent cc556b6 commit d10c923
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.383",
"version": "2.14.384",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions backend/src/restful/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default function serve() {
$app.start();

if ($.env.isNode) {
// Deprecated: SUB_STORE_BACKEND_CRON
const backend_sync_cron =
eval('process.env.SUB_STORE_BACKEND_SYNC_CRON') ||
eval('process.env.SUB_STORE_BACKEND_CRON');
Expand Down
8 changes: 4 additions & 4 deletions backend/src/restful/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async function compareSub(req, res) {
// add id
original.forEach((proxy, i) => {
proxy.id = i;
proxy.subName = sub.name;
proxy._subName = sub.name;
});

// apply processors
Expand Down Expand Up @@ -237,8 +237,8 @@ async function compareCollection(req, res) {
.flat();

currentProxies.forEach((proxy) => {
proxy.subName = sub.name;
proxy.collectionName = collection.name;
proxy._subName = sub.name;
proxy._collectionName = collection.name;
});

// apply processors
Expand Down Expand Up @@ -276,7 +276,7 @@ async function compareCollection(req, res) {

original.forEach((proxy, i) => {
proxy.id = i;
proxy.collectionName = collection.name;
proxy._collectionName = collection.name;
});

const processed = await ProxyUtils.process(
Expand Down
8 changes: 4 additions & 4 deletions backend/src/restful/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async function produceArtifact({
.flat();

proxies.forEach((proxy) => {
proxy.subName = sub.name;
proxy._subName = sub.name;
});
// apply processors
proxies = await ProxyUtils.process(
Expand Down Expand Up @@ -252,8 +252,8 @@ async function produceArtifact({
.flat();

currentProxies.forEach((proxy) => {
proxy.subName = sub.name;
proxy.collectionName = collection.name;
proxy._subName = sub.name;
proxy._collectionName = collection.name;
});

// apply processors
Expand Down Expand Up @@ -309,7 +309,7 @@ async function produceArtifact({
);

proxies.forEach((proxy) => {
proxy.collectionName = collection.name;
proxy._collectionName = collection.name;
});

// apply own processors
Expand Down

0 comments on commit d10c923

Please sign in to comment.