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

Method openScript

src/lib/ScriptManager.js:113–121  ·  view source on GitHub ↗

* Opens a script by setting its order property * @param {string} appId - The application ID * @param {number} scriptId - The script ID to open * @param {number} order - The order position for the tab * @returns {Promise}

(appId, scriptId, order)

Source from the content-addressed store, hash-verified

111 * @returns {Promise}
112 */
113 async openScript(appId, scriptId, order) {
114 const allScripts = await this.getScripts(appId);
115 const updatedScripts = allScripts.map(script =>
116 script.id === scriptId
117 ? { ...script, order }
118 : script
119 );
120 await this.saveScripts(appId, updatedScripts);
121 }
122
123 /**
124 * Closes a script by removing its order property

Callers 2

loadDataFunction · 0.80

Calls 2

getScriptsMethod · 0.95
saveScriptsMethod · 0.95

Tested by

no test coverage detected