Skip to content

Commit

Permalink
feat(api): resolve entry content if there is no summary
Browse files Browse the repository at this point in the history
  • Loading branch information
ymgyt committed Feb 23, 2024
1 parent 9f46285 commit 0459e71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/synd_api/src/gql/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ impl<'a> Entry<'a> {
self.entry.published().map(Into::into)
}

/// Entry summary
/// Entry summary. If there is no summary of the entry, return the content(is this bad api?)
async fn summary(&self) -> Option<&str> {
self.entry.summary()
self.entry.summary().or(self.entry.content())
}

/// Link to websiteurl at which this entry is published
Expand Down

0 comments on commit 0459e71

Please sign in to comment.