- 限制GetAPIOperator的长度为50个UNICODE,前缀改为jxadmin
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
|||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi"
|
"git.rosy.net.cn/baseapi"
|
||||||
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -101,10 +102,11 @@ func GetCurTimestamp() int64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GetAPIOperator(userName string) string {
|
func GetAPIOperator(userName string) string {
|
||||||
retVal := "jxc4-admin"
|
retVal := "jxadmin"
|
||||||
if userName != "" {
|
if userName != "" {
|
||||||
retVal += "-" + userName
|
retVal += "-" + userName
|
||||||
}
|
}
|
||||||
|
retVal = utils.LimitUTF8StringLen(retVal, 50)
|
||||||
return retVal
|
return retVal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user