server: fix compile problem with new PG schema

This commit is contained in:
Bill Thiede 2024-12-25 16:22:19 -08:00
parent 7827c24016
commit 6c2722314b

View File

@ -190,18 +190,8 @@ pub async fn thread(
let slug = r.site.unwrap_or("no-slug".to_string()); let slug = r.site.unwrap_or("no-slug".to_string());
let site = r.name.unwrap_or("NO SITE".to_string()); let site = r.name.unwrap_or("NO SITE".to_string());
let default_homepage = "http://no-homepage"; let default_homepage = "http://no-homepage";
let link = &r // TODO: remove the various places that have this as an Option
.link let link = Some(Url::parse(&r.link)?);
.as_ref()
.map(|h| {
if h.is_empty() {
default_homepage.to_string()
} else {
h.to_string()
}
})
.map(|h| Url::parse(&h).ok())
.flatten();
let mut body = r.summary.unwrap_or("NO SUMMARY".to_string()); let mut body = r.summary.unwrap_or("NO SUMMARY".to_string());
let cacher = Arc::new(Mutex::new(FilesystemCacher::new(&config.slurp_cache_path)?)); let cacher = Arc::new(Mutex::new(FilesystemCacher::new(&config.slurp_cache_path)?));
let body_tranformers: Vec<Box<dyn Transformer>> = vec![ let body_tranformers: Vec<Box<dyn Transformer>> = vec![