1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-21 01:09:17 +08:00
1Panel/agent/app/api/v2/health.go

19 lines
390 B
Go
Raw Normal View History

package v2
import (
"net/http"
"github.com/1Panel-dev/1Panel/agent/app/api/v2/helper"
"github.com/1Panel-dev/1Panel/agent/utils/xpack"
"github.com/gin-gonic/gin"
)
func (b *BaseApi) CheckHealth(c *gin.Context) {
_, err := xpack.RequestToMaster("/api/v2/agent/health", http.MethodGet, nil)
if err != nil {
2024-10-29 18:42:12 +08:00
helper.InternalServer(c, err)
return
}
helper.SuccessWithOutData(c)
}