package router type CheckType int const ( AuthCheckLogin CheckType = 1 ) // func AddAuthCheck(handlerFunc gin.HandlerFunc, checkType CheckType) gin.HandlerFunc { // return func(c *gin.Context) { // ctx := service.GetContextPtr(c) // if ctx == nil || ctx.UserID == -1 { // web.FailedResponse(c, trans.TR(true, trans.PermissionNotValid)) // return // } // handlerFunc(c) // } // }