From a430bb5a2655794bce017e2a147e3c4936d35940 Mon Sep 17 00:00:00 2001 From: Jrohy Date: Tue, 24 Nov 2020 15:08:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=99=BB=E5=BD=95=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/auth.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/auth.go b/web/auth.go index b6d9d4c7..b7022fe4 100644 --- a/web/auth.go +++ b/web/auth.go @@ -143,6 +143,15 @@ func Auth(r *gin.Engine) *jwt.GinJWTMiddleware { authO := r.Group("/auth") authO.Use(authMiddleware.MiddlewareFunc()) { + authO.GET("/loginUser", func(c *gin.Context) { + c.JSON(200, gin.H{ + "code": 200, + "message": "success", + "data": map[string]string{ + "username": RequestUsername(c), + }, + }) + }) authO.POST("/reset_pass", updateUser) authO.POST("/logout", authMiddleware.LogoutHandler) authO.POST("/refresh_token", authMiddleware.RefreshHandler)