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

Function apiUpdateGlobalBak

box/chavy.boxjs.js:855–864  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

853}
854
855async function apiUpdateGlobalBak() {
856 const { id: backupId, name: backupName } = $.toObj($request.body)
857 const backups = $.getjson($.KEY_backups, [])
858 const backup = backups.find((b) => b.id === backupId)
859 if (backup) {
860 backup.name = backupName
861 $.setjson(backups, $.KEY_backups)
862 }
863 $.json = getBoxData()
864}
865
866async function apiRevertGlobalBak() {
867 const { id: bakcupId } = $.toObj($request.body)

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected