links_controller.go 301 B

123456789101112131415161718
  1. package v1
  2. import (
  3. "github.com/runningwater/gohub/app/models/link"
  4. "github.com/runningwater/gohub/pkg/response"
  5. "github.com/gin-gonic/gin"
  6. )
  7. type LinksController struct {
  8. BaseApiController
  9. }
  10. func (ctrl *LinksController) Index(c *gin.Context) {
  11. links := link.All()
  12. response.Data(c, links)
  13. }