(sourceRelativePath, destinationRelativePath)
| 235 | * @returns {Promise<object>} - The response object from the API. |
| 236 | */ |
| 237 | export 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 |
no test coverage detected