package core

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

func GetComputingPowerHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		l := core.NewGetComputingPowerLogic(r.Context(), svcCtx)
		resp, err := l.GetComputingPower()
		result.HttpResult(r, w, resp, err)
	}
}
