add extra annotations

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2019-05-01 00:23:48 +08:00
committed by zryfish
parent 3e8035dc2b
commit 8e2acfa7f6
16 changed files with 162 additions and 59 deletions

View File

@@ -352,11 +352,11 @@ func ListUsers(conditions *params.Conditions, orderBy string, reverse bool, limi
}
switch orderBy {
case "username":
fallthrough
case "createTime":
return users[i].CreateTime.Before(users[j].CreateTime)
default:
return strings.Compare(users[i].Username, users[j].Username) <= 0
case "createTime":
fallthrough
default:
return users[i].CreateTime.Before(users[j].CreateTime)
}
})