fix(extension): restore deprecated request APIs for compatibility (#1628)

This commit is contained in:
Levi authored and GitHub committed 2026-10-31 17:51:56 +08:00
1 parent 8719166dbf
commit fc0a1e0ef9
6 files changed
+131 -3

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
gopeed.events.onResolve(async function (ctx) {
for (const method of ['setUrl', 'setLabels', 'putLabel', 'delLabel', 'setMethod', 'putHeader', 'setTrackers']) {
for (const method of ['setUrl', 'setMethod', 'putHeader', 'setTrackers']) {
if (typeof ctx.req[method] !== 'undefined') throw new Error(`onResolve exposes ${method}`);
}
ctx.req.labels = { replaced: "true", removed: "true" };