feat: 引入签名认证、加密工具包及大量goctl代码生成模板,并更新API、Admin和Node服务逻辑。
This commit is contained in:
@@ -8,17 +8,13 @@ import (
|
||||
|
||||
"github.com/zero-ppanel/zero-ppanel/apps/node/internal/logic/common"
|
||||
"github.com/zero-ppanel/zero-ppanel/apps/node/internal/svc"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"github.com/zero-ppanel/zero-ppanel/pkg/result"
|
||||
)
|
||||
|
||||
func HealthHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := common.NewHealthLogic(r.Context(), svcCtx)
|
||||
resp, err := l.Health()
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
}
|
||||
result.HttpResult(r, w, resp, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user