portainer/api/http/handler/endpoints/endpoint_status_inspect.go

22 lines
576 B
Go
Raw Normal View History

package endpoints
import (
"fmt"
"net/http"
httperror "github.com/portainer/libhttp/error"
"github.com/portainer/libhttp/request"
)
// DEPRECATED
func (handler *Handler) endpointStatusInspect(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id")
if err != nil {
return httperror.BadRequest("Invalid environment identifier route variable", err)
}
url := fmt.Sprintf("/api/endpoints/%d/edge/status", endpointID)
http.Redirect(w, r, url, http.StatusPermanentRedirect)
return nil
}