This commit is contained in:
Mika Bomm 2024-10-14 00:10:32 +02:00
parent bc8a300305
commit fcf449ec8b

View file

@ -112,7 +112,7 @@ pub async fn get_data(state: web::Data<AppState>) -> actix_web::Result<impl Resp
let mut result: Vec<NodeWithSensorData> = Vec::new();
for node in nodes {
let sensor_data = sensor_data::Entity::find()
.filter(sensor_data::Column::NodeId.eq(node.id))
.filter(sensor_data::Column::Id.eq(node.id))
.filter(sensor_data::Column::Timestamp.gt(one_hour_ago))
.all(db)
.await