basic.go 657 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package http
  2. import (
  3. "go-common/app/admin/ep/saga/model"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. func queryProjectStatus(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.QueryProjectStatus(c, req), nil)
  19. }
  20. func queryProjectTypes(c *bm.Context) {
  21. var (
  22. req = &model.ProjectDataReq{}
  23. err error
  24. )
  25. if err = c.Bind(req); err != nil {
  26. return
  27. }
  28. if req.Username, err = getUsername(c); err != nil {
  29. c.JSON(nil, err)
  30. return
  31. }
  32. c.JSON(srv.QueryProjectTypes(c, req), nil)
  33. }