Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima committed Jan 29, 2024
1 parent 8d3c362 commit 2e20926
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions app/handlers/random_hander.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ func (s *Router) FindRandomVideos() (map[string]*Video, error) {
results[item.Id.VideoId] = &video
}

ids := make([]string, len(results))
for _, video := range results {
ids = append(ids, video.ID)
var ids []string
for videoID := range results {
ids = append(ids, videoID)
}

videoInfoResult, err := s.ytr.VideosInfo(ids)
Expand Down
6 changes: 0 additions & 6 deletions app/youtube/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,3 @@ type VideosStatistics struct {
type VideosSnippet struct {
CategoryId string `json:"categoryId"`
}

// settings
type Settings struct {
YouTubeApiUrl string `json:"youtube_api_url"`
YouTubeApiKey string `json:"youtube_api_key"`
}

0 comments on commit 2e20926

Please sign in to comment.