This commit is contained in:
parent
632f476092
commit
16d7fe4beb
3 changed files with 9 additions and 3 deletions
6
keys.go
6
keys.go
|
|
@ -95,6 +95,12 @@ func declareAPIAuthKeysRoutes(router *gin.RouterGroup) {
|
|||
return
|
||||
}
|
||||
|
||||
k2 := key
|
||||
if err := k2.ReadInfos(u); err != nil {
|
||||
c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"errmsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
k, err := u.NewKey(key.Type, key.Content)
|
||||
if err != nil {
|
||||
log.Println("Unable to NewKey:", err)
|
||||
|
|
|
|||
Reference in a new issue