21 lines
517 B
Go
21 lines
517 B
Go
// Code scaffolded by goctl. Safe to edit.
|
|
// goctl 1.9.2
|
|
|
|
package common
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/zero-ppanel/zero-ppanel/apps/api/internal/logic/common"
|
|
"github.com/zero-ppanel/zero-ppanel/apps/api/internal/svc"
|
|
"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()
|
|
result.HttpResult(r, w, resp, err)
|
|
}
|
|
}
|