jct-user-ext-users.go 584 B

1234567891011121314151617181920212223242526272829
  1. package controllers_join
  2. import (
  3. "boiler-go/controllers"
  4. models_join "boiler-go/models/join"
  5. "encoding/json"
  6. "net/http"
  7. "github.com/dabory/abango-rest"
  8. "github.com/labstack/echo"
  9. )
  10. func UserExtUsersPage(c echo.Context) error {
  11. v := c.Get("receiver").(controllers.CommonPageReq)
  12. y := c.Get("abango").(abango.Controller)
  13. vRet := &struct {
  14. models_join.UserExtUsersPageRet
  15. }{}
  16. vRet.PageVars = v.PageVars
  17. if msg, err := vRet.GetUserExtUsersPage(y.Db); err != nil {
  18. return c.String(607, msg)
  19. }
  20. ret, _ := json.Marshal(vRet)
  21. return c.JSONBlob(http.StatusOK, ret)
  22. }