package image

import (
	"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/image"
	"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
	"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
	"net/http"
)

func UploadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		l := image.NewUploadLogic(r.Context(), svcCtx)
		err := l.Upload()
		result.HttpResult(r, w, nil, err)
	}
}
