Return error if no data from influx
actions/getsensorData.js - if values.length <= 2 then error
This commit is contained in:
@@ -241,7 +241,7 @@ export const fetchFromInflux = async (ret, query) => {
|
|||||||
return returnOnError(ret, err, fetchFromInflux.name)
|
return returnOnError(ret, err, fetchFromInflux.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (values.length === 0) {
|
if (values.length <= 2) {
|
||||||
return returnOnError(ret, ERR.NODATA, fetchFromInflux.name)
|
return returnOnError(ret, ERR.NODATA, fetchFromInflux.name)
|
||||||
}
|
}
|
||||||
ret.values = csv2Json(values)
|
ret.values = csv2Json(values)
|
||||||
|
|||||||
Reference in New Issue
Block a user