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

Method closeScript

src/lib/ScriptManager.js:129–137  ·  view source on GitHub ↗

* Closes a script by removing its order property * @param {string} appId - The application ID * @param {number} scriptId - The script ID to close * @returns {Promise}

(appId, scriptId)

Source from the content-addressed store, hash-verified

127 * @returns {Promise}
128 */
129 async closeScript(appId, scriptId) {
130 const allScripts = await this.getScripts(appId);
131 const updatedScripts = allScripts.map(script =>
132 script.id === scriptId
133 ? { ...script, order: undefined }
134 : script
135 );
136 await this.saveScripts(appId, updatedScripts);
137 }
138
139 /**
140 * Updates the order of open scripts

Callers 1

Calls 2

getScriptsMethod · 0.95
saveScriptsMethod · 0.95

Tested by

no test coverage detected