pipeline.go 768 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package http
  2. import (
  3. "go-common/app/admin/ep/saga/model"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. // @params TeamDataRequest
  7. // @router get /ep/admin/saga/v1/data/pipeline/report
  8. // @response TeamDataResp
  9. func queryTeamPipeline(c *bm.Context) {
  10. var (
  11. req = &model.TeamDataRequest{}
  12. err error
  13. )
  14. if err = c.Bind(req); err != nil {
  15. return
  16. }
  17. if req.Username, err = getUsername(c); err != nil {
  18. c.JSON(nil, err)
  19. return
  20. }
  21. c.JSON(srv.QueryTeamPipeline(c, req))
  22. }
  23. func queryProjectPipelineLists(c *bm.Context) {
  24. var (
  25. req = &model.PipelineDataReq{}
  26. err error
  27. )
  28. if err = c.Bind(req); err != nil {
  29. return
  30. }
  31. if req.Username, err = getUsername(c); err != nil {
  32. c.JSON(nil, err)
  33. return
  34. }
  35. c.JSON(srv.QueryProjectPipelineNew(c, req))
  36. }