Skip to content

Commit

Permalink
fix(catalogue): Data for The Rust Programming Language book
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Dec 9, 2024
1 parent c78f517 commit 3133968
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion content/books/the-rust-programming-language/_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"publishers": [
"No Starch Press"
],
"authors": [
"Steve Klabnik and Carol Nichols"
],
"publishDate": 1514764800
}
}
2 changes: 1 addition & 1 deletion db/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function getAuthorFromEntryMetadata(type: CatalogueType, metadata: any) {
case "game":
return metadata?.companies?.[0]?.name ?? "Unknown";
case "book":
return metadata.authors[0] ?? "Unknown";
return metadata.authors?.[0] ?? metadata.publishers[0] ?? "Unknown";
case "movie":
case "show":
return metadata?.companies[0] ?? "Unknown";
Expand Down

0 comments on commit 3133968

Please sign in to comment.