diff --git a/internal/mysql/devicerepo.go b/internal/mysql/devicerepo.go index df6227c..e800ea5 100644 --- a/internal/mysql/devicerepo.go +++ b/internal/mysql/devicerepo.go @@ -68,6 +68,7 @@ func (r *DeviceRepo) FetchByReference(ctx context.Context, kind models.Reference case models.RKBridgeID: q = q.Where(sq.Eq{"bridge_id": strings.Split(value, ",")}) case models.RKName: + value = strings.ReplaceAll(value, "*", "%") q = q.Where(sq.Like{"name": value}) case models.RKTag: allTags := strings.Split(strings.ReplaceAll(strings.ReplaceAll(value, "-", ",-"), "+", ",+"), ",")