()
| 757 | } |
| 758 | |
| 759 | async function apiAddAppSub() { |
| 760 | const sub = $.toObj($request.body) |
| 761 | // 添加订阅 |
| 762 | const usercfgs = getUserCfgs() |
| 763 | usercfgs.appsubs.push(sub) |
| 764 | $.setjson(usercfgs, $.KEY_usercfgs) |
| 765 | // 加载订阅缓存 |
| 766 | await reloadAppSubCache(sub.url) |
| 767 | $.json = getBoxData() |
| 768 | } |
| 769 | |
| 770 | async function apiAddAppSubRaw() { |
| 771 | // 直接粘贴 JSON 内容添加订阅(非远程 URL) |
nothing calls this directly
no test coverage detected