à demain

This commit is contained in:
anto
2025-03-09 15:15:23 +01:00
parent 7bbafe906b
commit bfd77bc843
6 changed files with 337 additions and 170 deletions

View File

@@ -29,6 +29,16 @@ function getAllProject() {
});
}
function getSingleProject(id) {
return $.ajax({
url: api_url.concat("/projects/"+id),
method: "GET",
dataType: "json"
}).then((data) => {
return data;
});
}
function getDataMetrics(projectId){
return $.ajax({
url: api_url.concat(`/projects/${projectId}/measurements`),
@@ -146,4 +156,24 @@ async function deleteVideo(id){
console.error("Error deleting video, video id :"+ id+"\n error :"+error);
throw error;
}
}
async function renderVideo(id){
try {
const mydata = JSON.stringify({
info:"none"
});
const response = await $.ajax({
url: api_url.concat(`/videos/render/`+id),
method: "POST",
dataType: "json",
contentType: "application/json",
data: mydata
});
console.log("Video rendered successfully:", response);
} catch (error) {
console.error("Error rendering video:", error);
throw error;
}
}