From eb39db808b7e7a3333ebf0b482715a1277d45cf2 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 17 Sep 2026 19:52:16 -0700 Subject: [PATCH] rebase migrated WeChat cache URLs --- servers/tools-pve/wechat-fulltext/app/service.mjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/servers/tools-pve/wechat-fulltext/app/service.mjs b/servers/tools-pve/wechat-fulltext/app/service.mjs index e14339a..aded3b9 100644 --- a/servers/tools-pve/wechat-fulltext/app/service.mjs +++ b/servers/tools-pve/wechat-fulltext/app/service.mjs @@ -65,7 +65,15 @@ async function readJson(path) { async function cachedResult(id) { try { const result = await readJson(join(articlesDirectory, id, 'result.json')); - return result.status === 'completed' ? result : null; + if (result.status !== 'completed') return null; + const marker = `/v1/articles/${id}/files/`; + for (const field of ['markdown_url', 'pdf_url', 'html_url', 'manifest_url']) { + const value = String(result[field] || ''); + const markerIndex = value.indexOf(marker); + if (markerIndex >= 0) result[field] = `${publicBaseUrl}${value.slice(markerIndex)}`; + } + result.status_url = statusUrl(id); + return result; } catch { return null; }