Ajouter la mise à jour du fichier vidéo et gérer les erreurs lors du rendu
This commit is contained in:
@@ -126,4 +126,12 @@ async function createVideo(projectId) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { createVideo, createVideoWithList, createVideoProject, deleteVideoProject };
|
||||
async function updateVideoFile(videoId, path) {
|
||||
const query = 'UPDATE public.videos SET video_file = $2 WHERE id = $1 RETURNING *';
|
||||
const values = [videoId, path];
|
||||
const res = await db.query(query, values);
|
||||
console.log('Video updated:', res.rows[0]);
|
||||
return res.rows[0];
|
||||
}
|
||||
|
||||
module.exports = { createVideo, createVideoWithList, createVideoProject, deleteVideoProject, updateVideoFile };
|
||||
|
||||
Reference in New Issue
Block a user