From ba0cdb944e128127b68fd45d92b25a4a6a58facd Mon Sep 17 00:00:00 2001 From: Mateusz Tylka Date: Tue, 18 Apr 2023 10:22:35 +0200 Subject: [PATCH] challenge submission web socket test --- src/api/challengeSubmissionPost.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/api/challengeSubmissionPost.js b/src/api/challengeSubmissionPost.js index 4e8f1c8..b0d5d10 100644 --- a/src/api/challengeSubmissionPost.js +++ b/src/api/challengeSubmissionPost.js @@ -33,6 +33,29 @@ const challengeSubmission = ( setLoading(true); const processUrl = API.replace('/api', ''); window.location.replace(`${processUrl}/open-view-progress/${data}#form`); + // console.log(data); + + // fetch(`${API}/view-progress-with-web-sockets/${data}`) + // .then((response) => response.text()) + // .then((data) => { + // console.log(data); + // }); + + // const viewLog = () => { + // fetch(`${API}/view-progress-log/${data}`) + // .then((response) => response.text()) + // .then((data) => { + // console.log(data); + // }); + // }; + + // for (let i = 0; i < 20; i++) { + // setInterval(() => { + // viewLog(); + // }, 1000); + // } + + // clearInterval(); }); };