package image import ( "net/http" "github.com/zeromicro/go-zero/rest/httpx" "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/image" "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc" ) func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { l := image.NewChunkLogic(r.Context(), svcCtx) err := l.Chunk() if err != nil { httpx.ErrorCtx(r.Context(), w, err) } else { httpx.Ok(w) } } }