Skip to content

Commit d08849e

Browse files
committed
Fix unmarshalling issue
1 parent 067cbe5 commit d08849e

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

pkg/posts/hot.go

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -282,40 +282,7 @@ type Post struct {
282282
IsDelisted bool `json:"isDelisted"`
283283
AnsweredByTarget bool `json:"answeredByTarget"`
284284
Contributors []struct {
285-
User struct {
286-
ID string `json:"_id"`
287-
Username string `json:"username"`
288-
Name string `json:"name"`
289-
Photo string `json:"photo"`
290-
Tagline string `json:"tagline"`
291-
Role interface{} `json:"role"`
292-
CoverImage string `json:"coverImage"`
293-
NumReactions int `json:"numReactions"`
294-
IsEvangelist bool `json:"isEvangelist"`
295-
BadgesAwarded []interface{} `json:"badgesAwarded"`
296-
TotalUpvotesReceived int `json:"totalUpvotesReceived"`
297-
Appreciations []struct {
298-
Badge string `json:"badge"`
299-
ID string `json:"_id"`
300-
Count int `json:"count"`
301-
} `json:"appreciations"`
302-
DateJoined time.Time `json:"dateJoined"`
303-
SocialMedia struct {
304-
Linkedin string `json:"linkedin"`
305-
Stackoverflow string `json:"stackoverflow"`
306-
Google string `json:"google"`
307-
Facebook string `json:"facebook"`
308-
Twitter string `json:"twitter"`
309-
Github string `json:"github"`
310-
Website string `json:"website"`
311-
} `json:"socialMedia"`
312-
StoriesCreated []string `json:"storiesCreated"`
313-
NumFollowing int `json:"numFollowing"`
314-
NumFollowers int `json:"numFollowers"`
315-
IsDeactivated bool `json:"isDeactivated"`
316-
Location string `json:"location"`
317-
TotalAppreciationBadges int `json:"totalAppreciationBadges"`
318-
} `json:"user"`
285+
User string `json:"user"`
319286
Stamp string `json:"stamp"`
320287
ID string `json:"_id"`
321288
} `json:"contributors"`

0 commit comments

Comments
 (0)