backend: Update recording stop response to include Location header with recording URL
This commit is contained in:
parent
578a3fec50
commit
8422b3c38a
@ -702,7 +702,13 @@ paths:
|
||||
example: 'room-123--EG_XYZ--XX445'
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully stopped the recording.
|
||||
description: Accepted — The stop request has been accepted. The endpoint to retrieve the recording is provided in the Location header.
|
||||
headers:
|
||||
Location:
|
||||
description: The URL to retrieve the recording details
|
||||
schema:
|
||||
type: string
|
||||
example: 'https://openvidu.example.com/meet/api/v1/recordings/room-123--EG_XYZ--XX445'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
|
||||
@ -94,6 +94,7 @@ export const stopRecording = async (req: Request, res: Response) => {
|
||||
const recordingService = container.get(RecordingService);
|
||||
|
||||
const recordingInfo = await recordingService.stopRecording(recordingId);
|
||||
res.setHeader('Location', `${req.protocol}://${req.get('host')}${req.originalUrl}`);
|
||||
return res.status(200).json(recordingInfo);
|
||||
} catch (error) {
|
||||
if (error instanceof OpenViduMeetError) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user