mirror of
https://github.com/rancher/norman.git
synced 2025-09-15 23:01:40 +00:00
more collection action code
This commit is contained in:
@@ -262,3 +262,8 @@ func parseResponseURLBase(requestURL string, r *http.Request) (string, error) {
|
||||
func (u *urlBuilder) Action(action string, resource *types.RawResource) string {
|
||||
return u.constructBasicURL(resource.Schema.Version, resource.Schema.PluralName, resource.ID) + "?action=" + url.QueryEscape(action)
|
||||
}
|
||||
|
||||
func (u *urlBuilder) CollectionAction(schema *types.Schema, versionOverride *types.APIVersion, action string) string {
|
||||
collectionURL := u.Collection(schema, versionOverride)
|
||||
return collectionURL + "?action=" + url.QueryEscape(action)
|
||||
}
|
||||
|
Reference in New Issue
Block a user