1
0

directives.go 314 B

123456789101112131415161718
  1. package nginx
  2. import (
  3. "net/http"
  4. "github.com/0xJacky/Nginx-UI/internal/nginx"
  5. "github.com/gin-gonic/gin"
  6. "github.com/uozi-tech/cosy"
  7. )
  8. func GetDirectives(c *gin.Context) {
  9. directives, err := nginx.GetDirectives()
  10. if err != nil {
  11. cosy.ErrHandler(c, err)
  12. return
  13. }
  14. c.JSON(http.StatusOK, directives)
  15. }