diff --git a/src/pages/api/providers.rs b/src/pages/api/providers.rs index 3cb0893..988e932 100644 --- a/src/pages/api/providers.rs +++ b/src/pages/api/providers.rs @@ -1,5 +1,5 @@ use leptos::prelude::*; -use leptos::logging::log; +use leptos::logging::debug_log; use std::collections::HashMap; use leptos::server_fn::codec::Json; use crate::common::ValueType; @@ -17,7 +17,7 @@ pub async fn get_provider_contact(id: String) -> Result Result { @@ -79,7 +78,7 @@ pub async fn get_all_scholarship_info() -> Result, ServerFnE use imports::*; let client = create_dynamo_client().await; - log!("Getting all scholarship info"); + debug_log!("Getting all scholarship info"); match client .scan() .table_name(SCHOLARSHIPS_TABLE) @@ -107,7 +106,7 @@ pub async fn get_provider_scholarships(provider_id: String) -> Result Result ) -> Result<(), ServerFnError> { - use leptos::logging::log; use imports::*; let client = create_dynamo_client().await; @@ -31,7 +31,7 @@ pub async fn put_student_data( AttributeValue::S(data_type.to_uppercase()) ); - log!("Inserting this item: {:?}", data_map_attr); + debug_log!("Inserting this item: {:?}", data_map_attr); client .put_item() diff --git a/src/pages/student/eligibility_page.rs b/src/pages/student/eligibility_page.rs index 9ada18c..e472472 100644 --- a/src/pages/student/eligibility_page.rs +++ b/src/pages/student/eligibility_page.rs @@ -1,4 +1,4 @@ -use leptos::logging::log; +use leptos::logging::debug_log; use leptos::prelude::*; use crate::common::{ComparisonData, ExpandableInfo, ValueType}; use crate::pages::api::{get_all_scholarship_info, get_comparison_info}; @@ -66,7 +66,7 @@ pub fn StudentEligibilityPage() -> impl IntoView { let scholarship_name = scholarship.data.get("name") .unwrap_or(&ValueType::String(None)) .as_string().ok().flatten().unwrap_or_default(); - log!("Checking scholarship: {}", scholarship_name); + debug_log!("Checking scholarship: {}", scholarship_name); // Each scholarship will return Some(itself), or None. This is will be automatically // filtered based on the information. Invalid scholarships are None, along with those @@ -78,8 +78,6 @@ pub fn StudentEligibilityPage() -> impl IntoView { .unwrap_or_default() .values().cloned() .collect::>(); - - log!("Requirements list after conversion: {:?}", requirements_map); let resolved_requirements = requirements_map .iter() @@ -97,7 +95,7 @@ pub fn StudentEligibilityPage() -> impl IntoView { }) .collect::>>(); - log!("Resolved requirements: {:?}", resolved_requirements.iter().flatten().map(|rel| rel.display_text.clone()).collect::>()); + debug_log!("Resolved requirements: {:?}", resolved_requirements.iter().flatten().map(|rel| rel.display_text.clone()).collect::>()); let valid = resolved_requirements.iter() .all(|list| { @@ -110,7 +108,7 @@ pub fn StudentEligibilityPage() -> impl IntoView { }); if valid { - log!("Scholarship is valid."); + debug_log!("Scholarship is valid."); Some(scholarship.clone()) } else { None