This commit is contained in:
@@ -128,6 +128,10 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
|
|||||||
queryArgs = append(queryArgs, userId)
|
queryArgs = append(queryArgs, userId)
|
||||||
|
|
||||||
// Add any other arguments to the query if they were specified
|
// 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 != "" {
|
if s.DeviceName != "" {
|
||||||
query += " AND DeviceName LIKE ? "
|
query += " AND DeviceName LIKE ? "
|
||||||
queryArgs = append(queryArgs, s.DeviceName)
|
queryArgs = append(queryArgs, s.DeviceName)
|
||||||
|
Reference in New Issue
Block a user