Fix key display
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
nemunaire 2022-09-20 00:35:01 +02:00
commit 16d7fe4beb
3 changed files with 9 additions and 3 deletions

View file

@ -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)