branch.go 765 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package http
  2. import (
  3. "go-common/app/admin/ep/saga/model"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. func queryProjectBranchList(c *bm.Context) {
  7. var (
  8. req = &model.ProjectDataReq{}
  9. err error
  10. )
  11. if err = c.Bind(req); err != nil {
  12. return
  13. }
  14. if req.Username, err = getUsername(c); err != nil {
  15. c.JSON(nil, err)
  16. return
  17. }
  18. c.JSON(srv.QueryProjectBranchList(c, req))
  19. }
  20. // @params queryBranchDiffWith
  21. // @router get /ep/admin/saga/v1/data/branch/report
  22. // @response BranchDiffWithRequest
  23. func queryBranchDiffWith(c *bm.Context) {
  24. var (
  25. req = &model.BranchDiffWithRequest{}
  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. return
  33. }
  34. c.JSON(srv.QueryBranchDiffWith(c, req))
  35. }