MCPcopy
hub / github.com/chavyleung/scripts / apiAddAppSub

Function apiAddAppSub

chavy.box.js:758–767  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

756}
757
758async function apiAddAppSub() {
759 const sub = $.toObj($request.body)
760 // 添加订阅
761 const usercfgs = getUserCfgs()
762 usercfgs.appsubs.push(sub)
763 $.setjson(usercfgs, $.KEY_usercfgs)
764 // 加载订阅缓存
765 await reloadAppSubCache(sub.url)
766 $.json = getBoxData()
767}
768
769async function apiDeleteAppSub() {
770 const sub = $.toObj($request.body)

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…