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

fix(code): clean up EE-4432 (#7865)

This commit is contained in:
andres-portainer 2022-10-14 18:09:07 -03:00 committed by GitHub
parent 367f3dd6d4
commit ae2bec4bd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 25 additions and 111 deletions

View file

@ -190,12 +190,8 @@ func (handler *Handler) endpointUpdate(w http.ResponseWriter, r *http.Request) *
switch *payload.Status {
case 1:
endpoint.Status = portainer.EndpointStatusUp
break
case 2:
endpoint.Status = portainer.EndpointStatusDown
break
default:
break
}
}
@ -328,7 +324,7 @@ func (handler *Handler) endpointUpdate(w http.ResponseWriter, r *http.Request) *
err = handler.SnapshotService.FillSnapshotData(endpoint)
if err != nil {
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to add snapshot data", err}
return httperror.InternalServerError("Unable to add snapshot data", err)
}
return response.JSON(w, endpoint)