feat 废弃jwt 、 学识分
This commit is contained in:
@@ -73,7 +73,7 @@ func InitRouter() *gin.Engine {
|
||||
auth.Use(authJwt())
|
||||
|
||||
// 网关
|
||||
initBaseRoute(auth)
|
||||
initGatewayPath(auth)
|
||||
// 用户中心
|
||||
initUserPath(auth)
|
||||
// 奇怪的知识-服务端
|
||||
@@ -82,14 +82,17 @@ func InitRouter() *gin.Engine {
|
||||
return r
|
||||
}
|
||||
|
||||
func initBaseRoute(r *gin.RouterGroup) {
|
||||
g := r.Group("/gw")
|
||||
func initGatewayPath(r *gin.RouterGroup) {
|
||||
g := r.Group("/" + common.KeyDiscoverServiceNameGateway)
|
||||
|
||||
g.POST("/open/login", http_handler.Login)
|
||||
g.POST("/open/refresh_token", http_handler.RefreshToken)
|
||||
g.POST("/open/logout", http_handler.Logout)
|
||||
}
|
||||
|
||||
func initUserPath(r *gin.RouterGroup) {
|
||||
g := r.Group("/user")
|
||||
g := r.Group("/" + common.KeyDiscoverServiceNameUser)
|
||||
|
||||
client, err := grpc_client.UserNewClientLB()
|
||||
if err != nil {
|
||||
log.Errorf("get user conn failed: %v", err)
|
||||
@@ -106,7 +109,8 @@ func initUserPath(r *gin.RouterGroup) {
|
||||
}
|
||||
|
||||
func initQgdzsPath(r *gin.RouterGroup) {
|
||||
g := r.Group("/qgdzs")
|
||||
g := r.Group("/" + common.KeyDiscoverServiceNameQgdzs)
|
||||
|
||||
client, err := grpc_client.QgdzsNewClientLB()
|
||||
if err != nil {
|
||||
log.Errorf("get qgdzs conn failed: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user