From 2bd2068c999cda5bda8c0787ed0dcaac6cb7afdb Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@iotlink.com> Date: 星期四, 31 十月 2019 13:27:46 +0800 Subject: [PATCH] feat: add system reboot api --- controllers/user.go | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/controllers/user.go b/controllers/user.go index 463c418..a78d271 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -47,6 +47,11 @@ tokenM["username"] = loginedM["username"] tokenM["permissions"] = loginedM["permissions"] tokenStr := (*authDriver).Login(c.Request, c.Writer, tokenM) + + + userId := loginedM["id"].(string) + auth.RemoveOutUser(userId) + c.JSON(200,map[string]interface{}{ "userInfo":loginedM, "access_token":tokenStr, @@ -60,6 +65,7 @@ } } +// @Security ApiKeyAuth // @Summary 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 // @Description 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 // @Accept json @@ -87,6 +93,7 @@ c.JSON(http.StatusOK,"閫�鍑烘垚鍔�") } +// @Security ApiKeyAuth // @Summary 鏌ユ壘鎵�鏈夌敤鎴� // @Description 鏌ユ壘鎵�鏈夌敤鎴� // @Accept json @@ -117,6 +124,7 @@ MenuIds []string `json:"menuIds"` } +// @Security ApiKeyAuth // @Summary 缂栬緫姝ょ敤鎴凤紝杩斿洖姝ょ敤鎴风殑鏉冮檺鑿滃崟 // @Description 缂栬緫姝ょ敤鎴凤紝杩斿洖姝ょ敤鎴风殑鏉冮檺鑿滃崟 // @Accept json @@ -141,6 +149,7 @@ } } +// @Security ApiKeyAuth // @Summary 鏇存柊鐢ㄦ埛鍚嶏紝瀵嗙爜鍜岃彍鍗曟潈闄� // @Description 鏇存柊鐢ㄦ埛鍚嶏紝瀵嗙爜鍜岃彍鍗曟潈闄� // @Accept json -- Gitblit v1.8.0