Fix bugs and add features to Znakopis document management
- Fix API endpoint for creating pages (documents/:id/pages) - Fix sentence deletion functionality - Add CreateDocumentDialog component for better UX - Improve document and sentence management UI - Update seed data and backend routes - Clean up documentation files (remove videos.md, videosentence.md) - Add comprehensive bug tracking in fixbugsaddfeatures.md
This commit is contained in:
@@ -85,7 +85,7 @@ export const documentApi = {
|
||||
|
||||
// Create a new page in a document
|
||||
async createPage(documentId: string, title?: string): Promise<DocumentPage> {
|
||||
const response = await api.post(`/api/${documentId}/pages`, { title });
|
||||
const response = await api.post(`/api/documents/${documentId}/pages`, { title });
|
||||
return response.data.page;
|
||||
},
|
||||
|
||||
@@ -96,7 +96,7 @@ export const documentApi = {
|
||||
data: CreateSentenceData
|
||||
): Promise<Sentence> {
|
||||
const response = await api.post(
|
||||
`/api/${documentId}/pages/${pageIndex}/sentences`,
|
||||
`/api/documents/${documentId}/pages/${pageIndex}/sentences`,
|
||||
data
|
||||
);
|
||||
return response.data.sentence;
|
||||
|
||||
Reference in New Issue
Block a user