Use named const instead of a raw string (#5115)

This commit is contained in:
Oleg Kovalov authored and Lunny Xiao committed 2018-10-20 10:25:38 +08:00
1 parent 971dccda16
commit cabdf84f1f
1 file changed
+1 -1
+1 -1
View File
@@ -1380,7 +1380,7 @@ func SearchUsers(opts *SearchUserOptions) (users []*User, _ int64, _ error) {
opts.Page = 1 opts.Page = 1
} }
if len(opts.OrderBy) == 0 { if len(opts.OrderBy) == 0 {
opts.OrderBy = "name ASC" opts.OrderBy = SearchOrderByAlphabetically
} }
users = make([]*User, 0, opts.PageSize) users = make([]*User, 0, opts.PageSize)