Skip to content

Commit

Permalink
Merge pull request #84 from Emilgardis/fix-mock-helix
Browse files Browse the repository at this point in the history
fix differences with prod
  • Loading branch information
lleadbet authored Aug 2, 2021
2 parents 9370e1a + 3d4fb36 commit 362d598
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/database/categories.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
type Category struct {
ID string `db:"id" json:"id"`
Name string `db:"category_name" json:"name"`
BoxartURL string `json:"boxart_url"`
BoxartURL string `json:"box_art_url"`
ViewerCount int `db:"vc" json:"-"`
}

Expand Down
3 changes: 3 additions & 0 deletions internal/database/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ type SearchChannel struct {
TagIDs []string `json:"tag_ids" dbi:"false"`
IsLive bool `json:"is_live" db:"is_live"`
StartedAt *string `db:"started_at" json:"started_at"`
// calculated fields
ThumbNailURL string `json:"thumbnail_url"`
}

func (q *Query) GetUser(u User) (User, error) {
Expand Down Expand Up @@ -327,6 +329,7 @@ func (q *Query) SearchChannels(query string, live_only bool) (*DBResponse, error
r[i].StartedAt = &emptyString
}
r[i].TagIDs = st
r[i].ThumbNailURL = "https://static-cdn.jtvnw.net/jtv_user_pictures/3f13ab61-ec78-4fe6-8481-8682cb3b0ac2-channel_offline_image-300x300.png"
}

dbr := DBResponse{
Expand Down
2 changes: 1 addition & 1 deletion internal/mock_api/endpoints/channels/information.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Channel struct {
CategoryID string `db:"category_id" json:"game_id"`
CategoryName string `db:"category_name" json:"game_name" dbi:"false"`
Title string `db:"title" json:"title"`
Language string `db:"stream_language" json:"stream_language"`
Language string `db:"stream_language" json:"broadcaster_language"`
Delay int `dbi:"false" json:"delay"`
}

Expand Down

0 comments on commit 362d598

Please sign in to comment.