fix passkey

This commit is contained in:
Sakurasan
2025-04-18 02:47:10 +08:00
parent afb51b0a94
commit e0b531c578
5 changed files with 25 additions and 3 deletions

View File

@@ -71,6 +71,15 @@ func (a Api) ListApiKey(c *gin.Context) {
if err != nil {
dto.Fail(c, 500, err.Error())
} else {
for _, key := range keys {
str := *key.ApiKey
slen := len(str)
if slen > 20 {
slen = 20
}
str = str[:slen]
key.ApiKey = &str
}
dto.Success(c, gin.H{
"total": total,
"keys": keys,