fork
This commit is contained in:
parent
1aebe2bdd2
commit
985895de97
@ -171,6 +171,13 @@ func UpdateToken(c *gin.Context) {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if len(token.Name) == 0 || len(token.Name) > 20 {
|
||||||
|
c.JSON(http.StatusOK, gin.H{
|
||||||
|
"success": false,
|
||||||
|
"message": "令牌名称长度必须在1-20之间",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
cleanToken, err := model.GetTokenByIds(token.Id, userId)
|
cleanToken, err := model.GetTokenByIds(token.Id, userId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
|
Loading…
Reference in New Issue
Block a user