feat:完善项目信息
This commit is contained in:
@ -3,6 +3,7 @@ package router
|
||||
import (
|
||||
"SciencesServer/app/logic"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
"SciencesServer/config"
|
||||
"SciencesServer/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
@ -63,8 +64,8 @@ func NeedPermission(skipperURL ...SkipperURL) PermissionHandle {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
session, _ := c.Get(config.TokenForSession)
|
||||
_session := session.(*service.Session)
|
||||
value, _ := c.Get(config.TokenForSession)
|
||||
_session := value.(*session.Admin)
|
||||
|
||||
if !_session.IsAdmin {
|
||||
if _session.TenantID > 0 {
|
||||
|
@ -41,7 +41,7 @@ func (this *Router) Init() *gin.Engine {
|
||||
app.NoMethod(NoMethodHandler())
|
||||
app.Use(LoggerHandle("log/gin.log", 3))
|
||||
app.Use(TimeoutHandle(time.Second * 30))
|
||||
app.Use(RecoveryHandler())
|
||||
//app.Use(RecoveryHandler())
|
||||
app.Use(ContentAnalysisHandler())
|
||||
|
||||
if this.RateLimitConfig != nil {
|
||||
|
Reference in New Issue
Block a user