瀏覽代碼

fix:象屿单点登录

Roc 1 年之前
父節點
當前提交
c834dcfa6d
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 1 1
      latest_filelog
  2. 4 4
      routers/xiangyu.go

+ 1 - 1
latest_filelog

@@ -1 +1 @@
-log/filelog/2024-02-05-00-00.log
+log/filelog/2024-02-22-00-00.log

+ 4 - 4
routers/xiangyu.go

@@ -9,9 +9,9 @@ import (
 // InitXiangyu 获取象屿
 func InitXiangyu(r *gin.RouterGroup) {
 	control := new(xiangyu.XiangyuController)
-	group := r.Group("xy/").Use(middleware.InternalToken())
-	group.GET("user/sync", control.SyncUser)
-	group.GET("user/pull", control.PullUser)
+	//group := r.Group("xy/").Use(middleware.InternalToken())
+	r.GET("user/sync", control.SyncUser)
+	r.GET("user/pull", control.PullUser)
 
 	// 需要内部鉴权的接口
 	initAuthXiangyu(r)
@@ -19,7 +19,7 @@ func InitXiangyu(r *gin.RouterGroup) {
 
 func initAuthXiangyu(r *gin.RouterGroup) {
 	control := new(xiangyu.XiangyuController)
-	group := r.Group("xy/").Use(middleware.Token())
+	group := r.Group("xy/").Use(middleware.InternalToken())
 	group.POST("auth/getToken", control.GetToken)
 	group.GET("auth/refreshToken", control.RefreshToken)
 	group.GET("auth/revokeToken", control.RevokeToken)