This commit is contained in:
@@ -118,7 +118,9 @@ func StoreSecret(c *gin.Context) {
|
||||
// TODO replace GetSecrets with SecretsGetFromMultipleSafes
|
||||
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
errString := fmt.Sprintf("error checking for existing secret : %s", err)
|
||||
log.Printf("StoreSecret %s\n", errString)
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": errString})
|
||||
return
|
||||
}
|
||||
if len(checkExists) > 0 {
|
||||
@@ -239,8 +241,8 @@ func UpdateSecret(c *gin.Context) {
|
||||
log.Printf("UpdateSecret received JSON input '%v'\n", input)
|
||||
|
||||
if len(input.SecretValue) == 0 {
|
||||
errString := "UpdateSecret no updated secret specified\n"
|
||||
log.Print(errString)
|
||||
errString := "no updated secret specified\n"
|
||||
log.Printf("UpdateSecret %s\n", errString)
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": errString})
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user