h5_todo_handler.go
536 字节
package todo
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc/cmd/bsi/api/internal/logic/todo"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc/cmd/bsi/api/internal/svc"
)
func H5TodoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := todo.NewH5TodoLogic(r.Context(), svcCtx)
resp, err := l.H5Todo()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJson(w, resp)
}
}
}