refactor: update Bruno API collection for media-items system

- Remove all ebook-specific API requests (15 files deleted)
- Rename Scan Ebooks.bru to Scan Media Items.bru
- Update API paths from /api/ebooks to /api/media-items
- Update base URL and environment configuration
- Maintain all existing media-items, library, auth, and progress tests

Aligns Bruno collection with unified media-items API architecture
This commit is contained in:
2026-01-30 13:52:06 -05:00
parent dc820dfb92
commit ba31e1491e
33 changed files with 81 additions and 1290 deletions
-50
View File
@@ -1,50 +0,0 @@
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 - DEPRECATED
⚠️ **This endpoint is deprecated and will return HTTP 410 Gone.**
**Use new library system instead:**
1. Create a library: `POST /api/libraries` with type "ebooks"
2. Add folder to library: `POST /api/libraries/{id}/folders`
3. Manage library visibility: `POST /api/libraries/visibility`
**Migration Example:**
Old: POST `/api/auth/ebook-folders` with `{ "folder_path": "/path/to/books" }`
New: POST `/api/libraries` with `{ "name": "My Books", "type": "ebooks" }`
Then POST `/api/libraries/{library-id}/folders` with `{ "folder_path": "/path/to/books" }`
**Response:** HTTP 410 Gone with deprecation message
**Status Codes:**
- 410: Gone (endpoint deprecated)
- 401: Unauthorized
- 403: Forbidden (admin access required)
**Replacement Endpoints:**
- `POST /api/libraries` - Create new library
- `POST /api/libraries/{id}/folders` - Add folder to library
- `GET /api/libraries` - List all libraries (admin)
}
-54
View File
@@ -1,54 +0,0 @@
meta {
name: Delete Ebook Folder
type: http
seq: 3
}
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 - DEPRECATED
⚠️ **This endpoint is deprecated and will return HTTP 410 Gone.**
**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
}
-44
View File
@@ -1,44 +0,0 @@
meta {
name: Get Ebook Folders
type: http
seq: 2
}
get {
url: {{base_url}}/api/auth/ebook-folders
body: none
auth: inherit
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Get Ebook Folders - DEPRECATED
⚠️ **This endpoint is deprecated and will return HTTP 410 Gone.**
**Use the new library system instead:**
- Use `/api/libraries` to manage libraries
- Use `/api/libraries/{id}/folders` to manage library folders
**Migration Path:**
1. Create a library of type "ebooks"
2. Add your ebook folders to that library
3. Use library visibility controls instead of user-specific folders
**Response:** HTTP 410 Gone with deprecation message
**Status Codes:**
- 410: Gone (endpoint deprecated)
- 401: Unauthorized
- 403: Forbidden (admin access required)
**Replacement Endpoints:**
- `GET /api/libraries` - List all libraries (admin)
- `GET /api/libraries/visible` - List user's visible libraries
- `POST /api/libraries` - Create new library
- `POST /api/libraries/{id}/folders` - Add folder to library
}