Fix: bad social links type #35

This commit is contained in:
Nguyen Vo
2023-11-11 13:12:01 +07:00
parent 4fd3949d1c
commit 41733dbf5c
2 changed files with 25 additions and 10 deletions
+5
View File
@@ -43,6 +43,7 @@ func (p *PixivClient) GetUserArtworksID(id string, category string, page int) (s
}
// Get the keys, because Pixiv only returns IDs (very evil)
if category == "illustrations" || category == "artworks" {
for k := range illusts {
ids = append(ids, k)
@@ -150,6 +151,7 @@ func (p *PixivClient) GetUserInformation(id string, category string, page int) (
user = body.User
if category != "bookmarks" {
// Artworks
ids, count, err := p.GetUserArtworksID(id, category, page)
@@ -185,6 +187,9 @@ func (p *PixivClient) GetUserInformation(id string, category string, page int) (
// Public bookmarks count
user.ArtworksCount = count
// Parse social medias
user.ParseSocial()
}
// Background image