package cloud

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

func CloudListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		l := cloud.NewCloudListLogic(r.Context(), svcCtx)
		resp, err := l.CloudList()
		result.HttpResult(r, w, resp, err)
	}
}
