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

This commit is contained in:
2024-01-16 17:00:53 +11:00
parent f5827ef432
commit 77d487c1ce

View File

@@ -161,12 +161,15 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
log.Printf("SecretsGetAllowed processing row\n")
var r UserSecret
err = rows.StructScan(&r)
log.Printf("SecretsGetAllowed performed struct scan\n")
if err != nil {
log.Printf("SecretsGetAllowed error parsing sql record : '%s'\n", err)
return secretResults, err
}
//log.Printf("r: %v\n", r)
log.Printf("SecretsGetAllowed performed err check\n")
// work around to get the UserId populated in the User field of the struct
r.User.UserId = r.UserUserId
@@ -174,6 +177,8 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
debugPrint := utils.PrintStructContents(&r, 0)
log.Println(debugPrint)
log.Printf("SecretsGetAllowed performed debug print\n")
// Append the secrets to the query output, don't decrypt the secrets (we didn't SELECT them anyway)
//secretResults = append(secretResults, r)
@@ -181,6 +186,8 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
// to avoid adding this element to the results
// if there is already a secret with the same ID present
secretResults = utils.AppendIfNotExists(secretResults, r)
log.Printf("SecretsGetAllowed added secret results\n")
}
log.Printf("SecretsGetAllowed retrieved '%d' results\n", len(secretResults))
}