anto
This commit is contained in:
@@ -37,7 +37,6 @@ function getDataMetrics(projectId){
|
||||
}).then((data) => {
|
||||
// If the request is successful, store the data in the cache and return it
|
||||
localStorage.setItem("project_list", JSON.stringify(data));
|
||||
console.log(data);
|
||||
return data;
|
||||
});
|
||||
}
|
||||
@@ -73,6 +72,16 @@ async function getDataVideoFromApi(id) {
|
||||
}
|
||||
}
|
||||
|
||||
function postNewVideo(project_id, measurements_id, name_video, resolution, duration, fps, status){
|
||||
|
||||
async function postNewVideo(project_id, measurements_id, name_video, resolution, duration){
|
||||
try {
|
||||
const response = await $.ajax({
|
||||
url: api_url.concat(`/videos/`),
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
});
|
||||
// If the request is successful, store the data in the cache and return it
|
||||
} catch (error) {
|
||||
console.error("Error fetching data:", error);
|
||||
throw error; // Re-throw the error to handle it outside the function if needed
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user