1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-18 16:35:19 +00:00

fix list link for cluster type

This commit is contained in:
Daishan Peng
2018-03-06 16:25:26 -07:00
committed by Darren Shepherd
parent 0ada2dfa79
commit dce4917fc2

View File

@@ -96,12 +96,7 @@ func (a *APIOperations) DoList(schemaType string, opts *types.ListOpts, respObje
return errors.New("Resource type [" + schemaType + "] is not listable") return errors.New("Resource type [" + schemaType + "] is not listable")
} }
collectionURL, ok := schema.Links[COLLECTION] return a.DoGet(a.Opts.URL+"/"+schemaType, opts, respObject)
if !ok {
return errors.New("Failed to find collection URL for [" + schemaType + "]")
}
return a.DoGet(collectionURL, opts, respObject)
} }
func (a *APIOperations) DoNext(nextURL string, respObject interface{}) error { func (a *APIOperations) DoNext(nextURL string, respObject interface{}) error {