1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +02:00

refactor(api): use a standard stack identifier (#1980)

This commit is contained in:
Anthony Lapenna 2018-06-18 12:07:56 +02:00 committed by GitHub
parent da5a430b8c
commit b4c2820ad7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 150 additions and 38 deletions

View file

@ -38,7 +38,7 @@ func (payload *updateSwarmStackPayload) Validate(r *http.Request) error {
// PUT request on /api/stacks/:id?endpointId=<endpointId>
func (handler *Handler) stackUpdate(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
stackID, err := request.RetrieveRouteVariableValue(r, "id")
stackID, err := request.RetrieveNumericRouteVariableValue(r, "id")
if err != nil {
return &httperror.HandlerError{http.StatusBadRequest, "Invalid stack identifier route variable", err}
}