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

This commit is contained in:
2024-01-08 16:29:03 +11:00
parent affe9021aa
commit 8cf05b6858

View File

@@ -65,6 +65,7 @@ func SecretsGetMultipleSafes(s *Secret, adminRole bool, safeIds []int) ([]Secret
args := []interface{}{} args := []interface{}{}
var query string var query string
if adminRole { if adminRole {
log.Printf("SecretsGetMultipleSafes using admin role so not limiting to specific safes\n")
// No need to limit query to any safe // No need to limit query to any safe
query = "SELECT * FROM secrets WHERE 1=1 " query = "SELECT * FROM secrets WHERE 1=1 "
} else { } else {
@@ -101,6 +102,7 @@ func SecretsGetMultipleSafes(s *Secret, adminRole bool, safeIds []int) ([]Secret
} }
// Execute the query // Execute the query
log.Printf("SecretsGetMultipleSafes query string : '%s'\n%+v\n", query, args)
rows, err := db.Queryx(query, args...) rows, err := db.Queryx(query, args...)
if err != nil { if err != nil {