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

Function apiDelGlobalBak

chavy.box.js:843–853  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

841}
842
843async function apiDelGlobalBak() {
844 const backup = $.toObj($request.body)
845 const backups = $.getjson($.KEY_backups, [])
846 const bakIdx = backups.findIndex((b) => b.id === backup.id)
847 if (bakIdx > -1) {
848 backups.splice(bakIdx, 1)
849 $.setdata('', backup.id)
850 $.setjson(backups, $.KEY_backups)
851 }
852 $.json = getBoxData()
853}
854
855async function apiUpdateGlobalBak() {
856 const { id: backupId, name: backupName } = $.toObj($request.body)

Callers

nothing calls this directly

Calls 5

getBoxDataFunction · 0.70
toObjMethod · 0.45
getjsonMethod · 0.45
setdataMethod · 0.45
setjsonMethod · 0.45

Tested by

no test coverage detected