Time to test.

This commit is contained in:
Michael Chung committed 2023-11-25 01:51:02 -05:00
1 parent a4c227a4ca
commit becf58a357
1 file changed
+5 -1
@@ -77,7 +77,11 @@ pub async fn list_weights_by_creator_username(
let raw_weights: Vec<RawWeightJoinUser> = get_raw_weights_by_creator_username(&mut connection, creator_username, can_see_deleted).await?;
let weights_records: Vec<WeightsJoinUserRecord> = map_to_weights(raw_weights).await;
Ok(weights_records)
let filtered_weights: Vec<WeightsJoinUserRecord> = weights_records.into_iter().filter(|weight| {
weight.creator_username == creator_username && weight.creator_set_visibility == Visibility::Public && can_see_deleted
}).collect();
Ok(filtered_weights)
}
pub async fn get_raw_weights_by_creator_username(