mirror of
https://github.com/niusmallnan/steve.git
synced 2025-09-09 09:00:31 +00:00
Fix off by one and 404
This commit is contained in:
3
vendor/github.com/rancher/norman/pkg/api/handler/list.go
generated
vendored
3
vendor/github.com/rancher/norman/pkg/api/handler/list.go
generated
vendored
@@ -33,6 +33,9 @@ func ListHandler(request *types.APIRequest) (types.APIObject, error) {
|
||||
request.Pagination = opts.Pagination
|
||||
data, err = store.List(request, request.Schema, &opts)
|
||||
data = request.Filter(&opts, request.Schema, data)
|
||||
if data.IsNil() {
|
||||
data = types.ToAPI([]interface{}{})
|
||||
}
|
||||
} else if request.Link == "" {
|
||||
data, err = store.ByID(request, request.Schema, request.Name)
|
||||
data = request.Filter(nil, request.Schema, data)
|
||||
|
Reference in New Issue
Block a user