updates
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-12 13:24:46 +11:00
parent 083fb0ebe1
commit 1a297464fe
3 changed files with 12 additions and 7 deletions

View File

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