(relativePath)
| 216 | }; |
| 217 | |
| 218 | export const createInputDirectory = async (relativePath) => { |
| 219 | const url = getApiUrl('/inputs/directory'); |
| 220 | const response = await fetch(url, { |
| 221 | method: 'POST', |
| 222 | headers: { 'Content-Type': 'application/json' }, |
| 223 | body: JSON.stringify({ relative_path: relativePath }), |
| 224 | }); |
| 225 | if (!response.ok) { |
| 226 | await handleApiError(response, `create input directory: ${relativePath}`); |
| 227 | } |
| 228 | return response.json(); |
| 229 | }; |
| 230 | |
| 231 | /** |
| 232 | * Moves a file or folder within the inputs directory. |
no test coverage detected