23 lines
558 B
Go
Raw Normal View History

2025-01-20 01:55:44 +08:00
package douyin
import (
"net/http"
"gitea.youtukeji.com.cn/xiabin/youtu_server/game_open_api/internal/logic/douyin"
"gitea.youtukeji.com.cn/xiabin/youtu_server/game_open_api/internal/svc"
2025-01-20 01:55:44 +08:00
"github.com/zeromicro/go-zero/rest/httpx"
)
func GetEcpmHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := douyin.NewGetEcpmLogic(r.Context(), svcCtx)
2025-01-20 10:10:08 +08:00
resp, err := l.GetEcpm()
2025-01-20 01:55:44 +08:00
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}