tianyuan-api-server/apps/api/internal/handler/IVYZ/ivyz9363handler.go
2024-10-12 23:49:59 +08:00

32 lines
731 B
Go

package IVYZ
import (
"net/http"
"tianyuan-api/pkg/response"
"github.com/zeromicro/go-zero/rest/httpx"
"tianyuan-api/apps/api/internal/logic/IVYZ"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
xhttp "github.com/zeromicro/x/http"
)
func IVYZ9363Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.Request
if err := httpx.Parse(r, &req); err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
return
}
l := IVYZ.NewIVYZ9363Logic(r.Context(), svcCtx)
resp, err := l.IVYZ9363(&req)
if err != nil {
response.Fail(r.Context(), w, err)
} else {
response.Success(r.Context(), w, resp)
}
}
}