à demain
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user