MCPcopy Create free account
hub / github.com/chavyleung/scripts / apiAddAppSub

Function apiAddAppSub

chavy.box.js:759–768  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

757}
758
759async 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
770async function apiAddAppSubRaw() {
771 // 直接粘贴 JSON 内容添加订阅(非远程 URL)

Callers

nothing calls this directly

Calls 5

getUserCfgsFunction · 0.70
reloadAppSubCacheFunction · 0.70
getBoxDataFunction · 0.70
toObjMethod · 0.45
setjsonMethod · 0.45

Tested by

no test coverage detected