()
| 14 | }; |
| 15 | |
| 16 | export const fetchFiles = async () => { |
| 17 | try { |
| 18 | const response = await axios.get('/api/files'); |
| 19 | return response.data; |
| 20 | } catch (error: any) { |
| 21 | throw error?.response?.data?.detail || 'Fetching files failed'; |
| 22 | } |
| 23 | }; |
| 24 | |
| 25 | export const deleteFile = async (fileId: number) => { |
| 26 | try { |