2022-04-07 14:33:14 +00:00
|
|
|
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 {
|
2022-09-14 23:42:39 +00:00
|
|
|
return httperror.BadRequest("Invalid environment identifier route variable", err)
|
2022-04-07 14:33:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
url := fmt.Sprintf("/api/endpoints/%d/edge/status", endpointID)
|
|
|
|
http.Redirect(w, r, url, http.StatusPermanentRedirect)
|
|
|
|
return nil
|
|
|
|
}
|