Skip to content

Commit

Permalink
panic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
freedit-dev committed Dec 4, 2024
1 parent 196613b commit d198726
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/controller/feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,8 @@ pub(super) async fn update(
title: atom.title.to_string(),
}
}
Err(_) => {
Err(e) => {
error!(?e);
return Err(AppError::InvalidFeedLink);
}
},
Expand Down
5 changes: 4 additions & 1 deletion src/controller/inn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,10 @@ pub(crate) async fn inn_feed(Path(i): Path<String>) -> Result<impl IntoResponse,
entries.push(entry);
}

let updated = entries[0].updated.clone();
let updated = entries
.first()
.map(|e| e.updated.clone())
.unwrap_or_default();
let page_atom = PageAtom {
domain: site_config.domain,
title,
Expand Down

0 comments on commit d198726

Please sign in to comment.