ferry/handler/nofound.go

19 lines
319 B
Go
Raw Normal View History

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