add comb86pm
This commit is contained in:
31
apps/api/internal/handler/COMB/comb86pmhandler.go
Normal file
31
apps/api/internal/handler/COMB/comb86pmhandler.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package COMB
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"tianyuan-api/apps/api/internal/logic/COMB"
|
||||
"tianyuan-api/apps/api/internal/svc"
|
||||
"tianyuan-api/apps/api/internal/types"
|
||||
"tianyuan-api/pkg/errs"
|
||||
"tianyuan-api/pkg/response"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func COMB86PMHandler(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 {
|
||||
response.Fail(r.Context(), w, errs.ErrParamValidation, nil)
|
||||
return
|
||||
}
|
||||
|
||||
l := COMB.NewCOMB86PMLogic(r.Context(), svcCtx)
|
||||
resp, err := l.COMB86PM(&req)
|
||||
if err != nil {
|
||||
response.Fail(r.Context(), w, err, resp)
|
||||
} else {
|
||||
response.Success(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.7.3
|
||||
// goctl 1.8.4
|
||||
|
||||
package handler
|
||||
|
||||
@@ -27,6 +27,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/COMB298Y",
|
||||
Handler: COMB.COMB298YHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/COMB86P",
|
||||
Handler: COMB.COMB86PMHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/v1"),
|
||||
|
||||
Reference in New Issue
Block a user