API Calls
- Fetch all pages:
fetchAllPages - Get a page by ID:
fetchPageById - Get a page by slug:
fetchPageBySlug - Create a new page:
createPage - Update a page:
updatePage - Delete a page:
deletePage
API Documentation
1. Get All Pages
Endpoint:/pages/all
Method: GET
Description: Retrieves a list of all pages.
Response:
2. Get a Page by ID
Endpoint:/pages/by-id/{id}
Method: GET
Description: Retrieves details of a single page by its ID.
Response:
3. Get a Page by Slug
Endpoint:/pages/{slug}
Method: GET
Description: Retrieves details of a single page by its slug.
Response:
4. Create a New Page
Endpoint:/pages/create
Method: POST
Description: Creates a new page.
Request Body:
5. Update a Page
Endpoint:/pages/{id}
Method: PUT
Description: Updates an existing page by its ID.
Request Body:
6. Delete a Page
Endpoint:/pages/{id}
Method: DELETE
Description: Deletes a page by its ID.
Response:

