tianyuan-api-server/apps/api/internal/handler/FLXG/flxg3d56handler.go
2024-10-12 21:35:35 +08:00

32 lines
731 B
Go

package FLXG
import (
"net/http"
"tianyuan-api/pkg/response"
"github.com/zeromicro/go-zero/rest/httpx"
"tianyuan-api/apps/api/internal/logic/FLXG"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
xhttp "github.com/zeromicro/x/http"
)
func FLXG3D56Handler(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 := FLXG.NewFLXG3D56Logic(r.Context(), svcCtx)
resp, err := l.FLXG3D56(&req)
if err != nil {
response.Fail(r.Context(), w, err)
} else {
response.Success(r.Context(), w, resp)
}
}
}