diff --git a/common/middleware/handler/auth.go b/common/middleware/handler/auth.go index bca0ff3c..739e44cd 100644 --- a/common/middleware/handler/auth.go +++ b/common/middleware/handler/auth.go @@ -46,6 +46,7 @@ func IdentityHandler(c *gin.Context) interface{} { } } +// Authenticator 获取token // @Summary 登陆 // @Description 获取token // @Description LoginHandler can be used by clients to get a jwt token. @@ -57,7 +58,7 @@ func IdentityHandler(c *gin.Context) interface{} { // @Product application/json // @Param account body Login true "account" // @Success 200 {string} string "{"code": 200, "expire": "2019-08-07T12:45:48+08:00", "token": ".eyJleHAiOjE1NjUxNTMxNDgsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTU2NTE0OTU0OH0.-zvzHvbg0A" }" -// @Router /login [post] +// @Router /api/v1/login [post] func Authenticator(c *gin.Context) (interface{}, error) { log := api.GetRequestLogger(c) db, err := pkg.GetOrm(c)