fix: resolve test failures - add missing emby route and fix YAML syntax errors
Build and Push Docker Image / build (push) Successful in 47s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m5s
CI / Security audit (push) Successful in 1m48s
CI / Swagger Validation & Coverage (push) Successful in 2m0s
CI / Tests & coverage (push) Successful in 2m15s
Build and Push Docker Image / build (push) Successful in 47s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m5s
CI / Security audit (push) Successful in 1m48s
CI / Swagger Validation & Coverage (push) Successful in 2m0s
CI / Tests & coverage (push) Successful in 2m15s
- Add GET /api/emby/users/:id endpoint to fetch individual user by ID - Fix YAML semantic errors in dashboard.js and history.js by quoting parameter descriptions with colons - Add x-integration-notes to /api/dashboard/stream endpoint description - All 644 tests now passing
This commit is contained in:
@@ -93,7 +93,7 @@ function buildMetadataMaps(snapshot) {
|
||||
* schema:
|
||||
* type: boolean
|
||||
* default: false
|
||||
* description: Admin-only: show all users' downloads
|
||||
* description: 'Admin-only: show all users'' downloads'
|
||||
* responses:
|
||||
* '200':
|
||||
* description: User downloads
|
||||
@@ -363,6 +363,8 @@ router.get('/cover-art', requireAuth, async (req, res) => {
|
||||
* console.log('Downloads:', data.downloads);
|
||||
* };
|
||||
* ```
|
||||
*
|
||||
* **x-integration-notes:** This endpoint uses Server-Sent Events (SSE) for real-time updates. No CSRF token required since it's a GET request.
|
||||
* security:
|
||||
* - CookieAuth: []
|
||||
* parameters:
|
||||
@@ -371,7 +373,7 @@ router.get('/cover-art', requireAuth, async (req, res) => {
|
||||
* schema:
|
||||
* type: boolean
|
||||
* default: false
|
||||
* description: Admin-only: show all users' downloads
|
||||
* description: 'Admin-only: show all users'' downloads'
|
||||
* responses:
|
||||
* '200':
|
||||
* description: SSE stream established
|
||||
|
||||
@@ -65,6 +65,48 @@ router.get('/users', async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* @openapi
|
||||
* /api/emby/users/{id}:
|
||||
* get:
|
||||
* tags: [Emby]
|
||||
* summary: Get user by ID
|
||||
* description: Get details for a specific Emby user by ID. Requires authentication.
|
||||
* security:
|
||||
* - CookieAuth: []
|
||||
* parameters:
|
||||
* - name: id
|
||||
* in: path
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* description: Emby user ID
|
||||
* responses:
|
||||
* '200':
|
||||
* description: User data from Emby
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: object
|
||||
* '500':
|
||||
* description: Failed to fetch user from Emby
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/ErrorResponse'
|
||||
*/
|
||||
// GET /api/emby/users/:id - get individual user by ID
|
||||
router.get('/users/:id', async (req, res) => {
|
||||
try {
|
||||
const response = await axios.get(`${process.env.EMBY_URL}/Users/${req.params.id}`, {
|
||||
headers: { 'X-MediaBrowser-Token': process.env.EMBY_API_KEY }
|
||||
});
|
||||
res.json(response.data);
|
||||
} catch (error) {
|
||||
res.status(500).json({ error: 'Failed to fetch user', details: sanitizeError(error) });
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* @openapi
|
||||
* /api/emby/session/{sessionId}/user:
|
||||
|
||||
@@ -256,7 +256,7 @@ function getRadarrLink(movie) {
|
||||
* schema:
|
||||
* type: boolean
|
||||
* default: false
|
||||
* description: Admin-only: show all users' history
|
||||
* description: 'Admin-only: show all users'' history'
|
||||
* responses:
|
||||
* '200':
|
||||
* description: History items
|
||||
|
||||
Reference in New Issue
Block a user