From fd4ddaf6d66444c4b9a3d1ea6a64dfd14331c5da Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Tue, 19 Mar 2019 07:19:01 +0100 Subject: [PATCH] Fix unsubscribe query --- cmd/hubserver/storage/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/hubserver/storage/postgres.go b/cmd/hubserver/storage/postgres.go index 689e57c..d4cc997 100644 --- a/cmd/hubserver/storage/postgres.go +++ b/cmd/hubserver/storage/postgres.go @@ -36,7 +36,7 @@ func (s *postgres) Subscribe(topic string, sub Subscriber) error { func (s *postgres) Unsubscribe(topic, callback string) error { _, err := s.db.Exec( - `DELETE FROM "subscribers" WHERE "topic" = ? AND "callback" = $1`, + `DELETE FROM "subscribers" WHERE "topic" = $1 AND "callback" = $2`, topic, callback, )