mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09:41 +02:00
docs(stacks): require endpoint id [EE-5286] (#8988)
This commit is contained in:
parent
b4dd5c5989
commit
6242952141
5 changed files with 19 additions and 7 deletions
|
@ -63,7 +63,7 @@ func (payload *updateSwarmStackPayload) Validate(r *http.Request) error {
|
|||
// @accept json
|
||||
// @produce json
|
||||
// @param id path int true "Stack identifier"
|
||||
// @param endpointId query int false "Stacks created before version 1.18.0 might not have an associated environment(endpoint) identifier. Use this optional parameter to set the environment(endpoint) identifier used by the stack."
|
||||
// @param endpointId query int true "Environment identifier"
|
||||
// @param body body updateSwarmStackPayload true "Stack details"
|
||||
// @success 200 {object} portainer.Stack "Success"
|
||||
// @failure 400 "Invalid request"
|
||||
|
@ -85,9 +85,9 @@ func (handler *Handler) stackUpdate(w http.ResponseWriter, r *http.Request) *htt
|
|||
}
|
||||
|
||||
// TODO: this is a work-around for stacks created with Portainer version >= 1.17.1
|
||||
// The EndpointID property is not available for these stacks, this API environment(endpoint)
|
||||
// The EndpointID property is not available for these stacks, this API endpoint
|
||||
// can use the optional EndpointID query parameter to associate a valid environment(endpoint) identifier to the stack.
|
||||
endpointID, err := request.RetrieveNumericQueryParameter(r, "endpointId", true)
|
||||
endpointID, err := request.RetrieveNumericQueryParameter(r, "endpointId", false)
|
||||
if err != nil {
|
||||
return httperror.BadRequest("Invalid query parameter: endpointId", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue