bug fix and auto detect nginx config dir path

This commit is contained in:
Jacky 2021-03-09 19:24:28 +08:00
parent cd6047ed50
commit 0ad1b3af4b
12 changed files with 219 additions and 59 deletions

View file

@ -1,9 +1,14 @@
package api
import (
"github.com/gin-gonic/gin"
"log"
"net/http"
)
func ErrorHandler(err error) {
func ErrorHandler(c *gin.Context, err error) {
log.Println(err)
c.JSON(http.StatusInternalServerError, gin.H{
"message": err.Error(),
})
}