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

This commit is contained in:
2024-01-08 17:03:05 +11:00
parent 8cf05b6858
commit c9a161ca25
2 changed files with 8 additions and 0 deletions

View File

@@ -119,6 +119,13 @@ func UpdateSecret(c *gin.Context) {
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
u, err := models.UserGetRoleFromToken(c)

View File

@@ -377,6 +377,7 @@ func UserGetSafesAllowed(userId int) ([]UserSafe, error) {
log.Printf("UserGetSafesAllowed error parsing sql record : '%s'\n", err)
return results, err
}
log.Printf("UserGetSafesAllowed adding record : '%+v'\n", us)
results = append(results, us)
}