Ajouter la mise à jour du fichier vidéo et gérer les erreurs lors du rendu
This commit is contained in:
@@ -315,13 +315,23 @@ router.post('/videos/render/:video_id', (req, res) => {
|
||||
const project_id = results.rows[0].project_id;
|
||||
console.log('Measurement IDs:', measurementIds);
|
||||
console.log('Project ID:', project_id);
|
||||
measureManager.getPathList(measurementIds, project_id).then(pathList => {
|
||||
const pathList = measureManager.getPathList(measurementIds, project_id).then(pathList => {
|
||||
console.log('Path list:', pathList);
|
||||
res.json({ message: 'Render process started' });
|
||||
}).catch(err => {
|
||||
console.error('Error getting path list:', err);
|
||||
res.status(500).json({ error: 'Error getting path list' });
|
||||
});
|
||||
|
||||
const videoFile = createVideoWithList(project_id, pathList);
|
||||
console.log('Video file:', videoFile);
|
||||
|
||||
try {
|
||||
videoManager.updateVideoFile(videoId, videoFile);
|
||||
} catch (err) {
|
||||
console.error('Error updating video file:', err);
|
||||
res.status(500).json({ error: 'Error updating video file' });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user