Skip to content

Commit

Permalink
Adjust default sort order for leaderboards in admin command
Browse files Browse the repository at this point in the history
  • Loading branch information
zyro committed Mar 24, 2017
1 parent 76ac761 commit 10bb86d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func createLeaderboard(args []string, logger zap.Logger) {
flags.StringVar(&dsns, "db", "root@localhost:26257", "CockroachDB JDBC connection details.")
flags.StringVar(&id, "id", "", "ID to assign to the leaderboard.")
flags.BoolVar(&authoritative, "authoritative", false, "True if clients may not submit scores directly, false otherwise.")
flags.StringVar(&sortOrder, "sort", "descending", "Leaderboard sort order, 'asc' or 'desc'.")
flags.StringVar(&sortOrder, "sort", "desc", "Leaderboard sort order, 'asc' or 'desc'.")
flags.StringVar(&resetSchedule, "reset", "", "Optional reset schedule in CRON format.")
flags.StringVar(&metadata, "metadata", "{}", "Optional additional metadata as a JSON string.")

Expand Down
2 changes: 1 addition & 1 deletion server/pipeline_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (p *pipeline) groupsFetch(logger zap.Logger, session *session, envelope *En
case *TGroupsFetch_GroupIds_:
for _, gid := range g.GetGroupIds().GroupIds {
groupID, err := uuid.FromBytes(gid)
if err != nil {
if err == nil {
params = append(params, groupID.Bytes())
statements = append(statements, "id = $"+strconv.Itoa(len(params)))
}
Expand Down

0 comments on commit 10bb86d

Please sign in to comment.