diff --git a/backend/package.json b/backend/package.json index 01b4b9a..fe4be9a 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.16.7", + "version": "2.16.8", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/products/cron-sync-artifacts.js b/backend/src/products/cron-sync-artifacts.js index 41c8f8b..bdf1122 100644 --- a/backend/src/products/cron-sync-artifacts.js +++ b/backend/src/products/cron-sync-artifacts.js @@ -174,6 +174,14 @@ async function doSync() { const resp = await syncToGist(files); const body = JSON.parse(resp.body); + delete body.history; + delete body.forks; + delete body.owner; + Object.values(body.files).forEach((file) => { + delete file.content; + }); + $.info('上传配置响应:'); + $.info(JSON.stringify(body, null, 2)); for (const artifact of allArtifacts) { if (artifact.sync) { diff --git a/backend/src/restful/sync.js b/backend/src/restful/sync.js index d209091..b73e6a8 100644 --- a/backend/src/restful/sync.js +++ b/backend/src/restful/sync.js @@ -625,6 +625,15 @@ async function syncArtifacts() { const resp = await syncToGist(files); const body = JSON.parse(resp.body); + delete body.history; + delete body.forks; + delete body.owner; + Object.values(body.files).forEach((file) => { + delete file.content; + }); + $.info('上传配置响应:'); + $.info(JSON.stringify(body, null, 2)); + for (const artifact of allArtifacts) { if (artifact.sync) { artifact.updated = new Date().getTime(); @@ -743,6 +752,16 @@ async function syncArtifact(req, res) { }); artifact.updated = new Date().getTime(); const body = JSON.parse(resp.body); + + delete body.history; + delete body.forks; + delete body.owner; + Object.values(body.files).forEach((file) => { + delete file.content; + }); + $.info('上传配置响应:'); + $.info(JSON.stringify(body, null, 2)); + let files = body.files; let isGitLab; if (Array.isArray(files)) {