19 lines
314 B
Go
19 lines
314 B
Go
package nginx
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/0xJacky/Nginx-UI/internal/nginx"
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/uozi-tech/cosy"
|
|
)
|
|
|
|
func GetDirectives(c *gin.Context) {
|
|
directives, err := nginx.GetDirectives()
|
|
if err != nil {
|
|
cosy.ErrHandler(c, err)
|
|
return
|
|
}
|
|
c.JSON(http.StatusOK, directives)
|
|
}
|