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

This commit is contained in:
2024-01-16 16:49:37 +11:00
parent e109cd084d
commit 5c3b2e19cf

View File

@@ -128,6 +128,10 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
queryArgs = append(queryArgs, userId)
// Add any other arguments to the query if they were specified
if s.SecretId > 0 {
query += " AND SecretId = ? "
queryArgs = append(queryArgs, s.SecretId)
}
if s.DeviceName != "" {
query += " AND DeviceName LIKE ? "
queryArgs = append(queryArgs, s.DeviceName)