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
5 changes: 3 additions & 2 deletions db/mapsets.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ func GetUserMapsetsFiltered(userId int, status enums.RankedStatus, page int, lim
offset := page * limit

result := SQL.Raw("SELECT mapsets.* FROM mapsets "+
"INNER JOIN maps ON maps.mapset_id = mapsets.id "+
"WHERE mapsets.creator_id = ? AND mapsets.visible = 1 AND maps.ranked_status = ? "+
"WHERE mapsets.creator_id = ? AND mapsets.visible = 1 AND EXISTS ("+
"SELECT 1 FROM maps WHERE maps.mapset_id = mapsets.id AND maps.ranked_status = ?"+
") "+
"ORDER BY mapsets.date_last_updated DESC "+
fmt.Sprintf("LIMIT %v OFFSET %v", limit, offset),
userId, status).Scan(&mapsets)
Expand Down
3 changes: 3 additions & 0 deletions enums/usergroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const (
UserGroupSwan
UserGroupContributor
UserGroupDonator
UserGroupTrialRankingSupervisor
UserGroupGraphicsDesigner
UserGroupHeadRankingSupervisor
)

// HasUserGroup Returns if a combination of user groups contains a single group
Expand Down
Loading