package WorkPhone

import (
	"net/http"

	"github.com/zeromicro/go-zero/rest/httpx"

	"wechat-api/internal/logic/WorkPhone"
	"wechat-api/internal/svc"
)

// swagger:route post /workphone/Qwaccount/refresh WorkPhone QwRefresh
//

//

//
// Responses:
//  200: BaseMsgResp

func QwRefreshHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		l := WorkPhone.NewQwRefreshLogic(r.Context(), svcCtx)
		resp, err := l.QwRefresh()
		if err != nil {
			httpx.ErrorCtx(r.Context(), w, err)
		} else {
			httpx.OkJsonCtx(r.Context(), w, resp)
		}
	}
}
