From b0500fee9c01e17c81b9293b244c8ed88dc9ca29 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期五, 11 十月 2019 15:12:25 +0800 Subject: [PATCH] add swagger --- controllers/user.go | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/controllers/user.go b/controllers/user.go index 8417d46..cb0dadd 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -44,6 +44,7 @@ tokenM := make(map[string]interface{},2) tokenM["id"] = loginedM["id"] tokenM["username"] = loginedM["username"] + tokenM["permissions"] = loginedM["permissions"] tokenStr := (*authDriver).Login(c.Request, c.Writer, tokenM) c.JSON(200,map[string]interface{}{ "userInfo":loginedM, @@ -85,6 +86,13 @@ c.JSON(http.StatusOK,"閫�鍑烘垚鍔�") } +// @Summary 鏌ユ壘鎵�鏈夌敤鎴� +// @Description 鏌ユ壘鎵�鏈夌敤鎴� +// @Accept json +// @Produce json +// @Tags 鐢ㄦ埛 +// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" +// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-u/users/findAllUser [get] func (uc UserController) FindAllUser(c *gin.Context) { var api dbapi.UserApi @@ -109,7 +117,7 @@ // @Accept json // @Produce json // @Tags 鐢ㄦ埛 -// @Param userVo body UserEditVo true "鐢ㄦ埛缂栬緫淇℃伅" +// @Param userVo body controllers.UserEditVo true "鐢ㄦ埛缂栬緫淇℃伅" // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/users/edit [post] -- Gitblit v1.8.0