MCPcopy Create free account
hub / github.com/parse-community/parse-dashboard / saveScripts

Method saveScripts

src/lib/ScriptManager.js:181–190  ·  view source on GitHub ↗

* Saves scripts to either server or local storage based on configuration and user preference * @param {string} appId - The application ID * @param {Array} scripts - Array of scripts to save * @returns {Promise}

(appId, scripts)

Source from the content-addressed store, hash-verified

179 * @returns {Promise}
180 */
181 async saveScripts(appId, scripts) {
182 // Check if server storage is enabled and user prefers it
183 if (this.serverStorage.isServerConfigEnabled() && prefersServerStorage(appId)) {
184 // Use server storage - no fallback to local
185 return await this._saveScriptsToServer(appId, scripts);
186 }
187
188 // Use local storage when server storage is not preferred
189 return this._saveScriptsToLocal(appId, scripts);
190 }
191
192 /**
193 * Migrates scripts from local storage to server storage

Callers 5

openScriptMethod · 0.95
closeScriptMethod · 0.95
updateScriptOrderMethod · 0.95
deleteScriptMethod · 0.95

Calls 4

_saveScriptsToServerMethod · 0.95
_saveScriptsToLocalMethod · 0.95
prefersServerStorageFunction · 0.90
isServerConfigEnabledMethod · 0.45

Tested by

no test coverage detected