- Backend: Add server-side validation with go-playground/validator/v10 - Frontend: Add toast notifications for API errors with @zerodevx/svelte-toast - UI: Complete Tokyo Night theme redesign with modern animations - Docs: Update COMPLETE_DOCUMENTATION.md and README.md with all enhancements - Validation: Email format, password strength, and input sanitization - UX: Real-time error feedback, loading states, and responsive design
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
meta:
|
|
name: Create Ebook
|
|
seq: 3
|
|
http:
|
|
method: post
|
|
url: "{{base_url}}/api/ebooks"
|
|
auth:
|
|
type: bearer
|
|
body:
|
|
type: json
|
|
data: |
|
|
{
|
|
"title": "Sample Book",
|
|
"author": "Sample Author",
|
|
"isbn": "1234567890",
|
|
"description": "A sample ebook",
|
|
"file_path": "/uploads/sample.epub",
|
|
"file_size": 1024000,
|
|
"mime_type": "application/epub+zip",
|
|
"cover_image_path": "/uploads/cover.jpg"
|
|
}
|
|
docs: |
|
|
## Create Ebook
|
|
|
|
Creates a new ebook entry in the library.
|
|
|
|
**Authentication:** Required (Bearer token)
|
|
|
|
**Request Body:**
|
|
- `title` (string, required): Book title
|
|
- `author` (string, optional): Book author
|
|
- `isbn` (string, optional): ISBN number
|
|
- `description` (string, optional): Book description
|
|
- `file_path` (string, required): Path to ebook file
|
|
- `file_size` (number, optional): File size in bytes
|
|
- `mime_type` (string, optional): MIME type
|
|
- `cover_image_path` (string, optional): Path to cover image
|
|
|
|
**Response:** Created ebook object
|
|
|
|
**Error Responses:**
|
|
- 401: Invalid authentication
|
|
- 400: Invalid request data |