From 77d487c1ce98cc1869c04884fb1d6b652ac764b0 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Tue, 16 Jan 2024 17:00:53 +1100 Subject: [PATCH] blah --- models/secret.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/models/secret.go b/models/secret.go index 3a0ac25..ab8c6e7 100644 --- a/models/secret.go +++ b/models/secret.go @@ -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)) }