feat: much better, smarter session acquisition

This commit is contained in:
2025-08-31 15:33:50 -05:00
parent 139e4aa635
commit 23be6035ed
11 changed files with 508 additions and 281 deletions

View File

@@ -21,6 +21,7 @@ pub async fn terms(
.data()
.app_state
.banner_api
.sessions
.get_terms(&search_term, page_number, max_results)
.await?;
@@ -46,7 +47,11 @@ fn format_term(term: &BannerTerm, current_term_code: &str) -> String {
} else {
""
};
let is_archived = if term.is_archived() { " (archived)" } else { "" };
let is_archived = if term.is_archived() {
" (archived)"
} else {
""
};
format!(
"- `{}`: {}{}{}",
term.code, term.description, is_current, is_archived

View File

@@ -4,7 +4,6 @@ use crate::error::Error;
pub mod commands;
pub mod utils;
#[derive(Debug)]
pub struct Data {
pub app_state: AppState,
} // User data, which is stored and accessible in all command invocations