ferry/handler/nofound.go

19 lines
307 B
Go
Raw Normal View History

2020-07-13 20:33:20 +08:00
package handler
import (
jwt "ferry/pkg/jwtauth"
2020-08-15 23:34:37 +08:00
"ferry/pkg/logger"
2020-07-13 20:33:20 +08:00
"net/http"
"github.com/gin-gonic/gin"
)
func NoFound(c *gin.Context) {
claims := jwt.ExtractClaims(c)
2020-08-15 23:34:37 +08:00
logger.Infof("NoRoute claims: %#v\n", claims)
2020-07-13 20:33:20 +08:00
c.JSON(http.StatusOK, gin.H{
"code": "404",
"message": "not found",
})
}