From cc227efa2c3c0fc333bf0f3db2327df5c36f7c17 Mon Sep 17 00:00:00 2001 From: sunty <1172534965@qq.com> Date: 星期四, 07 十一月 2019 19:58:16 +0800 Subject: [PATCH] add route --- controllers/user.go | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/controllers/user.go b/controllers/user.go index 56b5c8c..6f5fc2f 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -2,7 +2,6 @@ import ( "basic.com/dbapi.git" - "basic.com/valib/logger.git" "github.com/gin-gonic/gin" "net/http" "time" @@ -65,6 +64,7 @@ } } +// @Security ApiKeyAuth // @Summary 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 // @Description 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 // @Accept json @@ -92,6 +92,7 @@ c.JSON(http.StatusOK,"閫�鍑烘垚鍔�") } +// @Security ApiKeyAuth // @Summary 鏌ユ壘鎵�鏈夌敤鎴� // @Description 鏌ユ壘鎵�鏈夌敤鎴� // @Accept json @@ -102,10 +103,8 @@ // @Router /data/api-u/users/findAllUser [get] func (uc UserController) FindAllUser(c *gin.Context) { authDriver := auth.GenerateAuthDriver() - user := (*authDriver).User(c) - logger.Debug("cur userInfo:",user) - loginM := user.(map[string]interface{}) - userId := loginM["id"].(string) + userM := (*authDriver).User(c) + userId := userM["id"].(string) var api dbapi.UserApi b,d := api.FindAllUser(userId) if b { @@ -122,6 +121,7 @@ MenuIds []string `json:"menuIds"` } +// @Security ApiKeyAuth // @Summary 缂栬緫姝ょ敤鎴凤紝杩斿洖姝ょ敤鎴风殑鏉冮檺鑿滃崟 // @Description 缂栬緫姝ょ敤鎴凤紝杩斿洖姝ょ敤鎴风殑鏉冮檺鑿滃崟 // @Accept json @@ -146,6 +146,7 @@ } } +// @Security ApiKeyAuth // @Summary 鏇存柊鐢ㄦ埛鍚嶏紝瀵嗙爜鍜岃彍鍗曟潈闄� // @Description 鏇存柊鐢ㄦ埛鍚嶏紝瀵嗙爜鍜岃彍鍗曟潈闄� // @Accept json -- Gitblit v1.8.0