Skip to content

Commit

Permalink
chore(classroom): show subject term in search result
Browse files Browse the repository at this point in the history
  • Loading branch information
PeiPei233 committed Nov 26, 2024
1 parent b5e0f48 commit 340c124
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src-tauri/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ pub async fn search_courses(
let ppt_image_urls = Vec::new();
let sub_id = 0;
let sub_name = course
.get("subject_title")
.get("term_name")
.map_or("", |v| v.as_str().unwrap_or(""))
.to_string();
Subject {
Expand All @@ -1718,7 +1718,7 @@ pub async fn search_courses(
path,
ppt_image_urls,
sub_id,
sub_name: sub_name[..min(sub_name.len(), 7)].to_string(),
sub_name,
}
})
.collect::<Vec<Subject>>();
Expand Down

0 comments on commit 340c124

Please sign in to comment.