MCPcopy
hub / github.com/e-p-armstrong/augmentoolkit / moveInputItem

Function moveInputItem

atk-interface/src/api.js:237–251  ·  view source on GitHub ↗
(sourceRelativePath, destinationRelativePath)

Source from the content-addressed store, hash-verified

235 * @returns {Promise<object>} - The response object from the API.
236 */
237export const moveInputItem = async (sourceRelativePath, destinationRelativePath) => {
238 const url = getApiUrl('/inputs/move');
239 const response = await fetch(url, {
240 method: 'POST',
241 headers: { 'Content-Type': 'application/json' },
242 body: JSON.stringify({
243 source_relative_path: sourceRelativePath,
244 destination_relative_path: destinationRelativePath,
245 }),
246 });
247 if (!response.ok) {
248 await handleApiError(response, `move input item from ${sourceRelativePath} to ${destinationRelativePath}`);
249 }
250 return response.json();
251};
252
253// --- Output API ---
254

Callers 1

handleMoveFunction · 0.90

Calls 2

getApiUrlFunction · 0.90
handleApiErrorFunction · 0.90

Tested by

no test coverage detected