Return error if no data from influx

actions/getsensorData.js
   - if values.length <= 2 then error
This commit is contained in:
rxf
2023-04-07 17:19:23 +02:00
parent c3a4ff0b4a
commit e26fe7fd35
+1 -1
View File
@@ -241,7 +241,7 @@ export const fetchFromInflux = async (ret, query) => {
return returnOnError(ret, err, fetchFromInflux.name)
}
}
if (values.length === 0) {
if (values.length <= 2) {
return returnOnError(ret, ERR.NODATA, fetchFromInflux.name)
}
ret.values = csv2Json(values)