Merge branch 'main' of github.com:didi/nightingale
This commit is contained in:
commit
3921627fa2
|
@ -4,7 +4,7 @@ var (
|
|||
dict = map[string]string{
|
||||
"just a test": "这只是一个测试",
|
||||
"just a test: %s": "这只是一个测试: %s",
|
||||
"InternalServerError": "系统内部错误,请联系管理员",
|
||||
"Internal Server Error": "系统内部错误,请联系管理员",
|
||||
"Username or password invalid": "登录失败,请检查用户名和密码",
|
||||
"Username is blank": "用户名不能为空",
|
||||
"Username has invalid characters": "用户名含有非法字符",
|
||||
|
|
|
@ -17,8 +17,6 @@ import (
|
|||
promstat "github.com/didi/nightingale/v5/src/webapi/stat"
|
||||
)
|
||||
|
||||
var InternalServerError = "InternalServerError"
|
||||
|
||||
func stat() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
start := time.Now()
|
||||
|
|
|
@ -68,7 +68,7 @@ func logoutPost(c *gin.Context) {
|
|||
|
||||
delErr := deleteTokens(c.Request.Context(), metadata)
|
||||
if delErr != nil {
|
||||
ginx.NewRender(c).Message(InternalServerError)
|
||||
ginx.NewRender(c).Message(http.StatusText(http.StatusInternalServerError))
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ func refreshPost(c *gin.Context) {
|
|||
// Delete the previous Refresh Token
|
||||
err = deleteAuth(c.Request.Context(), refreshUuid)
|
||||
if err != nil {
|
||||
ginx.NewRender(c, http.StatusUnauthorized).Message(InternalServerError)
|
||||
ginx.NewRender(c, http.StatusUnauthorized).Message(http.StatusText(http.StatusInternalServerError))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue