feat:完善信息

This commit is contained in:
henry
2021-10-14 15:58:51 +08:00
parent cb130b6081
commit 456b8a849e
8 changed files with 382 additions and 6 deletions

View File

@ -1,6 +1,7 @@
package router
import (
"SciencesServer/config"
"SciencesServer/serve/logger"
"context"
"fmt"
@ -96,3 +97,19 @@ func RecoveryHandler() gin.HandlerFunc {
c.Next()
}
}
// ContentAnalysisHandler 消息体解析
func ContentAnalysisHandler() gin.HandlerFunc {
return func(c *gin.Context) {
url := c.Request.URL
var data string
value, has := config.SystemConfig[url.String()]
if has {
data = value.(string)
}
c.Set(config.ContentForLocal, data)
}
}