get requests update

This commit is contained in:
Ivan 2023-08-28 14:53:30 +03:00
parent 087e28dbb3
commit 82b24eb909
Signed by untrusted user who does not match committer: ppechenkoo
GPG Key ID: 0C191B86D9582583

View File

@ -1659,6 +1659,7 @@ app.get('/getData', async (req, res) => {
try { try {
const successResponse = await axios.get(`http://krbl.ru:8080/http/filelist/request?serial=${selectedSerial}&querytime=${selectedDate}&channel=${selectedChannel}`); const successResponse = await axios.get(`http://krbl.ru:8080/http/filelist/request?serial=${selectedSerial}&querytime=${selectedDate}&channel=${selectedChannel}`);
if (successResponse.data.SUCCESS) { if (successResponse.data.SUCCESS) {
await new Promise(resolve => setTimeout(resolve, 5000));
const dataResponse = await axios.get(`http://krbl.ru:8080/http/filelist/get?serial=${selectedSerial}&querytime=${selectedDate}&channel=${selectedChannel}`); const dataResponse = await axios.get(`http://krbl.ru:8080/http/filelist/get?serial=${selectedSerial}&querytime=${selectedDate}&channel=${selectedChannel}`);
if (successResponse.data.SUCCESS) { if (successResponse.data.SUCCESS) {
const dataId = dataResponse.data.DATAID; const dataId = dataResponse.data.DATAID;