Files
doc-forge/web/src/api/template.ts
T
zwt13703 e558733f05 init
2026-07-02 14:48:05 +08:00

10 lines
457 B
TypeScript

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}`),
}