import http from './index' export const templateApi = { list: (params?: any) => http.get('/templates', { params }), get: (id: number) => http.get(`/templates/${id}`), upload: (formData: FormData) => http.post('/templates/upload', formData, { headers: { 'Content-Type': 'multipart/form-data' } }), saveParagraphs: (id: number, data: any) => http.put(`/templates/${id}/paragraphs`, data), delete: (id: number) => http.delete(`/templates/${id}`), }