self_check.go 334 B

123456789101112131415161718
  1. package system
  2. import (
  3. "net/http"
  4. "github.com/0xJacky/Nginx-UI/internal/self_check"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func SelfCheck(c *gin.Context) {
  8. report := self_check.Run()
  9. c.JSON(http.StatusOK, report)
  10. }
  11. func SelfCheckFix(c *gin.Context) {
  12. result := self_check.AttemptFix(c.Param("name"))
  13. c.JSON(http.StatusOK, result)
  14. }