Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions api/testdata/trending_results_fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package testdata

var TrendingResultsFixtures = []map[string]any{
// Week 2022-01-21 - tracks 300, 202, 200 (rank 1, 2, 3) - matches trending order
{"user_id": 3, "id": "300", "rank": 1, "type": "TrendingType.TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
{"user_id": 2, "id": "202", "rank": 2, "type": "TrendingType.TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
{"user_id": 2, "id": "200", "rank": 3, "type": "TrendingType.TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
{"user_id": 3, "id": "300", "rank": 1, "type": "TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
{"user_id": 2, "id": "202", "rank": 2, "type": "TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
{"user_id": 2, "id": "200", "rank": 3, "type": "TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
// Week 2022-01-21 - underground tracks 519, 520, 521 (rank 1, 2, 3)
{"user_id": 8, "id": "519", "rank": 1, "type": "TrendingType.UNDERGROUND_TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
{"user_id": 11, "id": "520", "rank": 2, "type": "TrendingType.UNDERGROUND_TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
{"user_id": 1, "id": "521", "rank": 3, "type": "TrendingType.UNDERGROUND_TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
{"user_id": 8, "id": "519", "rank": 1, "type": "UNDERGROUND_TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
{"user_id": 11, "id": "520", "rank": 2, "type": "UNDERGROUND_TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
{"user_id": 1, "id": "521", "rank": 3, "type": "UNDERGROUND_TRACKS", "version": "TrendingVersion.ML51L", "week": "2022-01-21"},
}
2 changes: 1 addition & 1 deletion api/v1_tracks_trending_underground_winners.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (app *ApiServer) v1TracksTrendingUndergroundWinners(c *fiber.Ctx) error {

func (app *ApiServer) getTrendingUndergroundWinnersIds(c *fiber.Ctx, weekParam string) ([]int32, error) {
args := pgx.NamedArgs{
"type": "TrendingType.UNDERGROUND_TRACKS",
"type": "UNDERGROUND_TRACKS",
}

var weekFilter string
Expand Down
2 changes: 1 addition & 1 deletion api/v1_tracks_trending_winners.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (app *ApiServer) v1TracksTrendingWinners(c *fiber.Ctx) error {

func (app *ApiServer) getTrendingWinnersIds(c *fiber.Ctx, weekParam string) ([]int32, error) {
args := pgx.NamedArgs{
"type": "TrendingType.TRACKS",
"type": "TRACKS",
}

var weekFilter string
Expand Down
Loading