feat 废弃jwt 、 学识分

This commit is contained in:
2026-02-06 22:31:29 +08:00
parent b1dfb88f71
commit 456f1970eb
17 changed files with 236 additions and 156 deletions

View File

@@ -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)