refactor resources API

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2020-01-09 15:16:05 +08:00
parent 1f5defb044
commit 05e949103e
40 changed files with 469 additions and 1276 deletions

View File

@@ -138,13 +138,13 @@ func ListCategories(conditions *params.Conditions, orderBy string, reverse bool,
req := &pb.DescribeCategoriesRequest{}
if keyword := conditions.Match["keyword"]; keyword != "" {
if keyword := conditions.Match[Keyword]; keyword != "" {
req.SearchWord = &wrappers.StringValue{Value: keyword}
}
if orderBy != "" {
req.SortKey = &wrappers.StringValue{Value: orderBy}
}
req.Reverse = &wrappers.BoolValue{Value: !reverse}
req.Reverse = &wrappers.BoolValue{Value: reverse}
req.Limit = uint32(limit)
req.Offset = uint32(offset)
resp, err := client.Category().DescribeCategories(openpitrix.SystemContext(), req)