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)