feat: jwt middleware

This commit is contained in:
fallen-angle
2022-02-12 16:32:34 +08:00
parent 2d43931fc8
commit 72ef5c92c4
10 changed files with 83 additions and 33 deletions

View File

@@ -18,3 +18,7 @@ func Error(c *gin.Context, status int, code int, msg interface{}, data interface
func Succ(c *gin.Context, data interface{}) {
Success(c, http.StatusOK, "success", data)
}
func Err(c *gin.Context, status int, code int, msg interface{}) {
c.JSON(status, models.GinResponse{Code: code, Msg: msg})
}