jct-user-menu-perm-page.go 586 B

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