feat: Add admin ebook folder management routes to Bruno collection
- Add POST /api/auth/ebook-folders for adding ebook folders - Add GET /api/auth/ebook-folders for retrieving configured folders - Add DELETE /api/auth/ebook-folders for removing ebook folders - Include comprehensive documentation and request examples - Support path normalization and admin-only access
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
meta {
|
||||
name: Delete Ebook Folder
|
||||
type: http
|
||||
seq: 10
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{base_url}}/api/auth/ebook-folders
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"folder_path": "/path/to/ebooks"
|
||||
}
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## Delete Ebook Folder
|
||||
|
||||
Deletes an ebook folder for the authenticated user.
|
||||
|
||||
**Method:** DELETE
|
||||
|
||||
**Endpoint:** /api/auth/ebook-folders
|
||||
|
||||
**Authentication:** Required (Admin only)
|
||||
|
||||
**Request Body:** JSON object with:
|
||||
- `folder_path` (string, required): Path to the ebook folder to delete
|
||||
|
||||
**Response:** Success message object:
|
||||
- `message` (string): "ebook folder deleted successfully"
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Folder deleted successfully
|
||||
- 400: Bad request (invalid folder path)
|
||||
- 401: Unauthorized
|
||||
- 403: Forbidden (admin access required)
|
||||
- 404: Folder not found
|
||||
- 500: Internal server error
|
||||
|
||||
**Features:**
|
||||
- Admin-only endpoint for deleting ebook folders
|
||||
- Path normalization for matching
|
||||
- Supports both absolute paths and home directory (~) paths
|
||||
- Prevents deletion of non-existent folders
|
||||
}
|
||||
Reference in New Issue
Block a user