Fix book link
This commit is contained in:
parent
ce99b3a3c6
commit
0920771bbf
@ -48,7 +48,7 @@ func SearchBookByTitle(title string, book *Book) error {
|
||||
book.ID = items[0].(map[string]interface{})["id"].(string)
|
||||
book.Title = bookInfo["title"].(string)
|
||||
book.Author = bookInfo["authors"].([]interface{})[0].(string)
|
||||
book.Link = bookInfo["infoLink"].(string)
|
||||
book.Link = items[0].(map[string]interface{})["selfLink"].(string)
|
||||
if pageCount, ok := bookInfo["pageCount"].(float64); ok {
|
||||
book.Pages = int(pageCount)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user