You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
510 B

package health
import (
"net/http"
"backend/usercenter/api/internal/logic/health"
"backend/usercenter/api/internal/svc"
"github.com/zeromicro/go-zero/rest/httpx"
)
func UsercenterPingHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := health.NewUsercenterPingLogic(r.Context(), svcCtx)
resp, err := l.UsercenterPing()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}