package monitoring

import (
	"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
	"net/http"

	"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/monitoring"
	"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
)

func ScheduleSituationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		l := monitoring.NewScheduleSituationLogic(r.Context(), svcCtx)
		resp, err := l.ScheduleSituation()
		result.HttpResult(r, w, resp, err)
	}
}
