backend: Rename recording content endpoint to media

This commit is contained in:
Carlos Santos 2025-04-08 19:03:56 +02:00
parent 597b412027
commit 6774e56a27
4 changed files with 10 additions and 10 deletions

View File

@ -18,7 +18,7 @@ paths:
/recordings/{recordingId}: /recordings/{recordingId}:
$ref: './paths/recordings.yaml#/~1recordings~1{recordingId}' $ref: './paths/recordings.yaml#/~1recordings~1{recordingId}'
/recordings/{recordingId}/content: /recordings/{recordingId}/content:
$ref: './paths/recordings.yaml#/~1recordings~1{recordingId}~1content' $ref: './paths/recordings.yaml#/~1recordings~1{recordingId}~1media'
components: components:
securitySchemes: securitySchemes:
$ref: './components/security.yaml' $ref: './components/security.yaml'

View File

@ -126,13 +126,13 @@
$ref: '../components/responses/error-recording-in-progress.yaml' $ref: '../components/responses/error-recording-in-progress.yaml'
'500': '500':
$ref: '../components/responses/internal-server-error.yaml' $ref: '../components/responses/internal-server-error.yaml'
/recordings/{recordingId}/content: /recordings/{recordingId}/media:
get: get:
operationId: getRecordingContent operationId: getRecordingMeedia
summary: Get recording content summary: Get recording media
description: > description: >
Retrieves the content of a recording with the specified recording ID. Retrieves the media of a recording with the specified recording ID.
The content is returned in a binary format suitable for video playback. The media is returned in a binary format suitable for video playback.
This endpoint supports range requests, allowing partial content retrieval This endpoint supports range requests, allowing partial content retrieval
for video playback without downloading the entire file. for video playback without downloading the entire file.
tags: tags:

View File

@ -127,13 +127,13 @@ export const deleteRecording = async (req: Request, res: Response) => {
}; };
/** /**
* Streams a recording video file to the client with support for range requests. * Get recording media
* *
* This controller endpoint retrieves a recording by its ID and streams it as a video/mp4 file. * This controller endpoint retrieves a recording by its ID and streams it as a video/mp4 file.
* It supports HTTP range requests, allowing for features like video seeking and partial downloads. * It supports HTTP range requests, allowing for features like video seeking and partial downloads.
* *
*/ */
export const getRecordingContent = async (req: Request, res: Response) => { export const getRecordingMedia = async (req: Request, res: Response) => {
const logger = container.get(LoggerService); const logger = container.get(LoggerService);
const recordingId = req.params.recordingId; const recordingId = req.params.recordingId;

View File

@ -46,10 +46,10 @@ recordingRouter.delete(
); );
recordingRouter.get( recordingRouter.get(
'/:recordingId/content', '/:recordingId/media',
withAuth(apiKeyValidator, tokenAndRoleValidator(UserRole.ADMIN)), withAuth(apiKeyValidator, tokenAndRoleValidator(UserRole.ADMIN)),
withValidRecordingId, withValidRecordingId,
recordingCtrl.getRecordingContent recordingCtrl.getRecordingMedia
); );
// Internal Recording Routes // Internal Recording Routes