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

Function apiSaveGlobalBak

chavy.box.js:838–852  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

836}
837
838async function apiSaveGlobalBak() {
839 const backups = $.getjson($.KEY_backups, [])
840 const boxdata = getBoxData()
841 const backup = $.toObj($request.body)
842 const backupData = {}
843 backupData['chavy_boxjs_userCfgs'] = boxdata.usercfgs
844 backupData['chavy_boxjs_sessions'] = boxdata.sessions
845 backupData['chavy_boxjs_cur_sessions'] = boxdata.curSessions
846 backupData['chavy_boxjs_app_subCaches'] = boxdata.appSubCaches
847 Object.assign(backupData, boxdata.datas)
848 backups.push(backup)
849 $.setjson(backups, $.KEY_backups)
850 $.setjson(backupData, backup.id)
851 $.json = getBoxData()
852}
853
854async function apiImpGlobalBak() {
855 const backups = $.getjson($.KEY_backups, [])

Callers

nothing calls this directly

Calls 4

getBoxDataFunction · 0.70
getjsonMethod · 0.45
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…