csfetchplayerqueuehandler.go 637 B

12345678910111213141516171819202122232425
  1. package handler
  2. import (
  3. "net/http"
  4. "ylink/comm/result"
  5. "github.com/zeromicro/go-zero/rest/httpx"
  6. "ylink/bff/cmdbff/api/internal/logic"
  7. "ylink/bff/cmdbff/api/internal/svc"
  8. "ylink/bff/cmdbff/api/internal/types"
  9. )
  10. func csFetchPlayerQueueHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
  11. return func(w http.ResponseWriter, r *http.Request) {
  12. var req types.CsFetchPlayerQueueReq
  13. if err := httpx.Parse(r, &req); err != nil {
  14. result.ParamErrorResult(r, w, err)
  15. return
  16. }
  17. l := logic.NewCsFetchPlayerQueueLogic(r.Context(), svcCtx)
  18. resp, err := l.CsFetchPlayerQueue(&req)
  19. result.HttpResult(r, w, resp, err)
  20. }
  21. }