diff --git a/cmd/hubserver/storage/postgres.go b/cmd/hubserver/storage/postgres.go index 51380c2..689e57c 100644 --- a/cmd/hubserver/storage/postgres.go +++ b/cmd/hubserver/storage/postgres.go @@ -44,7 +44,7 @@ func (s *postgres) Unsubscribe(topic, callback string) error { } func (s *postgres) Subscribers(topic string) ([]Subscriber, error) { - rows, err := s.db.Query(`SELECT callback, lease_seconds, secret, created FROM "subscribers"`) + rows, err := s.db.Query(`SELECT callback, lease_seconds, secret, created FROM "subscribers" WHERE "topic" = $1`, topic) if err != nil { return nil, err }