Files
bookhoard/bruno/admin/Add Ebook Folder.bru
T
john-okeefe 49ee68e905 chore: Clean up and reorganize Bruno collection after rebuild
- Remove duplicate Get Admin Dashboard.bru (same as /admin route)
- Reorder sequence numbers for logical grouping
- Add missing body: none to GET requests
- Standardize folder path examples to /app/uploads
- Fix file formatting and add missing newlines
2026-01-27 16:50:49 -05:00

57 lines
1.2 KiB
Plaintext

meta {
name: Add Ebook Folder
type: http
seq: 1
}
post {
url: {{base_url}}/api/auth/ebook-folders
body: json
auth: inherit
}
body:json {
{
"folder_path": "/app/uploads"
}
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Add Ebook Folder
Adds a new ebook folder for the authenticated user.
**Method:** POST
**Endpoint:** /api/auth/ebook-folders
**Authentication:** Required (Admin only)
**Request Body:** JSON object with:
- `folder_path` (string, required): Path to the ebook folder
**Response:** Folder object with:
- `id` (string): Folder ID (UUID)
- `user_id` (string): User ID (UUID)
- `folder_path` (string): Normalized folder path
- `created_at` (string): Creation timestamp (ISO 8601)
**Status Codes:**
- 201: Folder created successfully
- 400: Bad request (invalid folder path)
- 401: Unauthorized
- 403: Forbidden (admin access required)
- 500: Internal server error
**Features:**
- Admin-only endpoint for adding ebook folders
- Path normalization for consistent storage
- Supports both absolute paths and home directory (~) paths
- Prevents duplicate folders for the same user
}