feat:完善项目信息

This commit is contained in:
henry
2022-01-04 11:59:58 +08:00
parent c3da1ebc51
commit e29371da3e
20 changed files with 357 additions and 62 deletions

View File

@ -6,6 +6,7 @@ import (
api2 "SciencesServer/app/api/website/api"
"SciencesServer/app/basic/api"
"SciencesServer/app/session"
"SciencesServer/config"
"github.com/gin-gonic/gin"
)
@ -121,7 +122,7 @@ func registerAdminAPI(app *gin.Engine) {
g := app.Group(apiPrefix)
// 登录验证
g.Use(NeedLogin(session.NewManage(), AddSkipperURL([]string{
g.Use(NeedLogin(config.RedisKeyForAccountManage, session.NewManage(), AddSkipperURL([]string{
apiPrefix + "/captcha",
apiPrefix + "/account/login",
apiPrefix + "/account/logout",
@ -229,7 +230,7 @@ func registerEnterpriseAPI(app *gin.Engine) {
apiPrefix := "/enterprise"
g := app.Group(apiPrefix)
g.Use(NeedLogin(session.NewEnterprise(), AddSkipperURL([]string{
g.Use(NeedLogin(config.RedisKeyForAccountEnterprise, session.NewEnterprise(), AddSkipperURL([]string{
apiPrefix + "/v1/account/login",
apiPrefix + "/v1/account/register",
apiPrefix + "/v1/account/authorize",