(relativePath)
| 65 | * @returns {Promise<object>} - API response. |
| 66 | */ |
| 67 | export const createConfigDirectory = async (relativePath) => { |
| 68 | const url = getApiUrl('/configs/directory'); |
| 69 | const response = await fetch(url, { |
| 70 | method: 'POST', |
| 71 | headers: { 'Content-Type': 'application/json' }, |
| 72 | body: JSON.stringify({ relative_path: relativePath }), |
| 73 | }); |
| 74 | // Use handleApiResponse which includes error handling |
| 75 | return handleApiResponse(response); |
| 76 | }; |
| 77 | |
| 78 | /** |
| 79 | * Deletes a specific config file. |
no test coverage detected