Skip to content

Commit

Permalink
refactor: small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Oct 23, 2023
1 parent 0f17d40 commit 50dcc7b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions server/api/src/public/v1/calculate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use model::{
args::{Args, ArgsUnwrapped, CalculationMode, SortBy},
FeatureHelpers, GeoFormats, Precision, ToCollection, ToFeature, ToSingleVec,
},
db::{area, geofence, instance, route, sea_orm_active_enums::Type, GenericData},
db::{area, geofence, instance, route, sea_orm_active_enums::Type},
KojiDb,
};
use serde_json::json;
Expand Down Expand Up @@ -222,15 +222,12 @@ async fn cluster(

let data_points = if !data_points.is_empty() {
data_points
.iter()
.map(|p| GenericData::new("".to_string(), p[0], p[1]))
.collect()
} else {
utils::points_from_area(&area, &category, &conn, last_seen, tth)
.await
.map_err(actix_web::error::ErrorInternalServerError)?
}
.to_single_vec();
.to_single_vec()
};

log::debug!(
"[{}] Found Data Points: {}",
Expand Down

0 comments on commit 50dcc7b

Please sign in to comment.