jct-item-igroup-page.go 583 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 ItemIgroupPage(c echo.Context) error {
  11. v := c.Get("receiver").(controllers.CommonPageReq)
  12. y := c.Get("abango").(abango.Controller)
  13. vRet := &struct {
  14. models_join.ItemIgroupPageRet
  15. }{}
  16. vRet.PageVars = v.PageVars
  17. if err := vRet.GetItemIgroupPage(y.Db); err != nil {
  18. return c.String(607, err.Error())
  19. }
  20. ret, _ := json.Marshal(vRet)
  21. return c.JSONBlob(http.StatusOK, ret)
  22. }