package handler import ( "net/http" "github.com/zeromicro/go-zero/rest/httpx" "jyBXSubscribe/api/internal/logic" "jyBXSubscribe/api/internal/svc" "jyBXSubscribe/api/internal/types" ) func ByPushHistoryHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req types.SubscribeReq if err := httpx.Parse(r, &req); err != nil { httpx.Error(w, err) return } l := logic.NewByPushHistoryLogic(r.Context(), svcCtx) resp, err := l.ByPushHistory(&req) if err != nil { httpx.Error(w, err) } else { httpx.OkJson(w, resp) } } }