Skip to content

Commit

Permalink
Move namespace into body for scale function
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Jul 6, 2023
1 parent c7114c1 commit e625c75
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions proxy/scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func (c *Client) ScaleFunction(ctx context.Context, functionName, namespace stri
scaleReq := types.ScaleServiceRequest{
ServiceName: functionName,
Replicas: replicas,
Namespace: namespace,
}

var err error
Expand All @@ -28,9 +29,6 @@ func (c *Client) ScaleFunction(ctx context.Context, functionName, namespace stri

functionPath := filepath.Join(scalePath, functionName)
query := url.Values{}
if len(namespace) > 0 {
query.Add("namespace", namespace)
}

req, err := c.newRequest(http.MethodPost, functionPath, query, bodyReader)
if err != nil {
Expand Down

0 comments on commit e625c75

Please sign in to comment.