2025-01-20 10:10:08 +08:00

23 lines
498 B
Go

package douyin
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"youtu_server/game_open_api/internal/logic/douyin"
"youtu_server/game_open_api/internal/svc"
)
func GetEcpmHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := douyin.NewGetEcpmLogic(r.Context(), svcCtx)
resp, err := l.GetEcpm()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}