feat:完善项目信息
This commit is contained in:
@ -38,7 +38,7 @@ func registerAPI(app *gin.Engine) {
|
||||
configV1 := v1.Group("/config")
|
||||
{
|
||||
_api := new(api2.Config)
|
||||
configV1.POST("area", _api.Area)
|
||||
configV1.POST("/area", _api.Area)
|
||||
}
|
||||
// User 用户信息管理
|
||||
userV1 := v1.Group("/user")
|
||||
@ -196,6 +196,11 @@ func registerAdminAPI(app *gin.Engine) {
|
||||
menu.POST("/status", _api.Status)
|
||||
menu.POST("/delete", _api.Delete)
|
||||
}
|
||||
// Config 配置管理
|
||||
//config := v1.Group("/config")
|
||||
//{
|
||||
//
|
||||
//}
|
||||
// Auth 权限管理
|
||||
auth := v1.Group("/auth")
|
||||
{
|
||||
@ -206,7 +211,7 @@ func registerAdminAPI(app *gin.Engine) {
|
||||
department := v1.Group("/department")
|
||||
{
|
||||
_api := new(api1.Department)
|
||||
department.GET("/list", _api.List)
|
||||
department.GET("/", _api.Index)
|
||||
department.GET("/select", _api.Select)
|
||||
department.POST("/add", _api.Add)
|
||||
department.POST("/edit", _api.Edit)
|
||||
@ -216,7 +221,7 @@ func registerAdminAPI(app *gin.Engine) {
|
||||
role := v1.Group("/role")
|
||||
{
|
||||
_api := new(api1.Role)
|
||||
role.POST("/list", _api.List)
|
||||
role.POST("/", _api.Index)
|
||||
role.POST("/select", _api.Select)
|
||||
role.POST("/add", _api.Add)
|
||||
role.POST("/edit", _api.Edit)
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/config"
|
||||
"SciencesServer/utils"
|
||||
"fmt"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
@ -32,7 +31,6 @@ func NeedLogin(key string, session logic.ISession, skipperURL ...SkipperURL) gin
|
||||
return
|
||||
}
|
||||
token := c.GetHeader(config.APIRequestToken)
|
||||
fmt.Println(token)
|
||||
|
||||
if token == "" {
|
||||
c.JSON(http.StatusUnauthorized, gin.H{"message": "Token异常"})
|
||||
@ -46,7 +44,6 @@ func NeedLogin(key string, session logic.ISession, skipperURL ...SkipperURL) gin
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
fmt.Println(utils.AnyToJSON(session))
|
||||
c.Set(config.TokenForSession, session)
|
||||
c.Next()
|
||||
}
|
||||
|
Reference in New Issue
Block a user