This commit is contained in:
arussac
2025-03-10 16:50:30 +01:00
parent f359281afe
commit bbcffff85e
2 changed files with 9 additions and 2 deletions

View File

@@ -163,9 +163,12 @@ document.addEventListener("DOMContentLoaded", async () => {
alert('Nouvelle vidéo enregistrée :\nNom : ' + nameVideo +
'\nRésolution : ' + videoResolution +
'\nDurée : ' + videoDuration + ' secondes');
}).then(()=>{
}).then((data)=>{
console.log(data);
console.log(" ")
getDataProjectVideosFromApi(projectId).then((data)=>{
console.log(data)
idVideo = data[data.length-1].id
console.log(idVideo)
renderVideo(idVideo)
})
})

View File

@@ -102,6 +102,7 @@ async function postNewVideo(project_id, measurements_id, name_video, resolution,
});
alert("Video posted successfully:", response);
location.reload();
} catch (error) {
alert("Error posting video:", error);
throw error;
@@ -125,6 +126,7 @@ async function PostNewProject(nameProject, description){
});
alert("Video posted successfully:", response);
location.reload();
} catch (error) {
alert("Error posting video:", error);
throw error;
@@ -138,6 +140,7 @@ async function deleteProject(id){
method: "DELETE",
}).then(()=>{
alert("Projet supprimé avec succès")
location.reload();
})
} catch (error) {
alert("Error deleting project, project id :"+ id+"\n error :"+error);
@@ -151,6 +154,7 @@ async function deleteVideo(id){
method: "DELETE",
}).then(()=>{
alert("Video supprimé avec succès")
location.reload();
})
} catch (error) {
alert("Error deleting video, video id :"+ id+"\n error :"+error);