Skip to content

Commit

Permalink
Merge branch 'ptitloup/feature_video_p2p' of https://github.com/ptitl…
Browse files Browse the repository at this point in the history
…oup/Esup-Pod into ptitloup/feature_video_p2p
  • Loading branch information
AymericJak committed Dec 14, 2023
2 parents e6299fe + 917a6fd commit 1189eff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pod/peer_to_peer/static/peer_to_peer/js/p2p-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,21 @@ async function getIds() {
let postData = {
'url': videoId,
};
console.log('[p2p-script.js] postData:', postData);
// TODO Update the URL
fetch('http://localhost:9090/peer-to-peer/get-ids/', {
await fetch('http://localhost:9090/peer-to-peer/get-ids/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(postData),
}).then(response => response.json())
.then(response => console.log(response))
.then(response => {
idList = [].concat(response);
console.log(idList);
})
.catch(err => console.error(err));
return idList;
}

async function storeUrlsId() {
Expand Down

0 comments on commit 1189eff

Please sign in to comment.