fix openpitrix resource sort param
Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
@@ -42,6 +42,11 @@ func ListApplications(req *restful.Request, resp *restful.Response) {
|
||||
orderBy := req.QueryParameter(params.OrderByParam)
|
||||
reverse := params.ParseReverse(req)
|
||||
|
||||
if orderBy == "" {
|
||||
orderBy = "create_time"
|
||||
reverse = true
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
resp.WriteHeaderAndEntity(http.StatusBadRequest, errors.Wrap(err))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user