Hoàn thành bước 3.3. Interactive Workbook (The Core Viewer)

This commit is contained in:
2026-03-31 14:38:17 +07:00
parent 9450cd3ed4
commit c362692c51
8 changed files with 824 additions and 2 deletions
+9
View File
@@ -36,4 +36,13 @@ export const api = {
uploadPdfs: (formData: FormData) =>
request<import("@/types").PDFUploadResult[]>("/api/pdfs/upload", { method: "POST", body: formData }),
deletePdf: (id: number) => request<void>(`/api/pdfs/${id}`, { method: "DELETE" }),
// Annotations
getAnnotation: (pdfId: number, page: number) =>
request<import("@/types").AnnotationData>(`/api/annotations/${pdfId}/${page}`),
upsertAnnotation: (pdfId: number, page: number, body: { canvas_data: object }) =>
request<import("@/types").AnnotationData>(`/api/annotations/${pdfId}/${page}`, {
method: "PUT",
body: JSON.stringify(body),
}),
};