fix RoleId in secrets table
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-08 15:45:08 +11:00
parent ac60d1daef
commit 1a2b6e5b41
3 changed files with 18 additions and 1 deletions

View File

@@ -183,7 +183,7 @@ func GetSecrets(s *Secret, adminRole bool) ([]Secret, error) {
} else if s.UserName != "" {
rows, err = db.Queryx("SELECT * FROM secrets WHERE UserName LIKE ? AND SafeId = ?", s.UserName, s.SafeId)
} else {
rows, err = db.Queryx("SELECT * FROM secrets WHERE RoleId = ?", s.SafeId)
rows, err = db.Queryx("SELECT * FROM secrets WHERE SafeId = ?", s.SafeId)
//log.Printf("GetSecret no valid search options specified\n")
//err = errors.New("no valid search options specified")
//return secretResults, err