This commit is contained in:
@@ -119,6 +119,13 @@ func UpdateSecret(c *gin.Context) {
|
|||||||
|
|
||||||
log.Printf("UpdateSecret received JSON input '%v'\n", input)
|
log.Printf("UpdateSecret received JSON input '%v'\n", input)
|
||||||
|
|
||||||
|
if input.SafeId == 0 && len(input.SafeName) == 0 {
|
||||||
|
errString := "StoreSecret no safe specified\n"
|
||||||
|
log.Print(errString)
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": errString})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Get the user and role id of the requestor
|
// Get the user and role id of the requestor
|
||||||
u, err := models.UserGetRoleFromToken(c)
|
u, err := models.UserGetRoleFromToken(c)
|
||||||
|
@@ -377,6 +377,7 @@ func UserGetSafesAllowed(userId int) ([]UserSafe, error) {
|
|||||||
log.Printf("UserGetSafesAllowed error parsing sql record : '%s'\n", err)
|
log.Printf("UserGetSafesAllowed error parsing sql record : '%s'\n", err)
|
||||||
return results, err
|
return results, err
|
||||||
}
|
}
|
||||||
|
log.Printf("UserGetSafesAllowed adding record : '%+v'\n", us)
|
||||||
results = append(results, us)
|
results = append(results, us)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user