MCPcopy Create free account
hub / github.com/Moli-X/Other / getAppDatas

Function getAppDatas

Backups/KeLee/Resource/Script/BoxJS/BoxJS.js:545–562  ·  view source on GitHub ↗

* =================================== * 接口类函数 * ===================================

(app)

Source from the content-addressed store, hash-verified

543 */
544
545function getAppDatas(app) {
546 const datas = {}
547 const nulls = [null, undefined, 'null', 'undefined']
548 if (app.keys && Array.isArray(app.keys)) {
549 app.keys.forEach((key) => {
550 const val = $.getdata(key)
551 datas[key] = nulls.includes(val) ? null : val
552 })
553 }
554 if (app.settings && Array.isArray(app.settings)) {
555 app.settings.forEach((setting) => {
556 const key = setting.id
557 const val = $.getdata(key)
558 datas[key] = nulls.includes(val) ? null : val
559 })
560 }
561 return datas
562}
563
564async function apiSave() {
565 const data = $.toObj($request.body)

Callers 1

getBoxDataFunction · 0.85

Calls 1

getdataMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…