diff --git a/content/books/the-rust-programming-language/_data.json b/content/books/the-rust-programming-language/_data.json index 03dd432..bd54bbd 100644 --- a/content/books/the-rust-programming-language/_data.json +++ b/content/books/the-rust-programming-language/_data.json @@ -3,5 +3,8 @@ "publishers": [ "No Starch Press" ], + "authors": [ + "Steve Klabnik and Carol Nichols" + ], "publishDate": 1514764800 -} \ No newline at end of file +} diff --git a/db/seed.ts b/db/seed.ts index dec8940..bdef413 100644 --- a/db/seed.ts +++ b/db/seed.ts @@ -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";