From 4a7173ea9d3161fe4d724c8d3c9d3cd4e353882d Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Fri, 24 Mar 2023 13:38:27 -0400 Subject: [PATCH] fix delete too --- internal/repository/postgres_watcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/repository/postgres_watcher.go b/internal/repository/postgres_watcher.go index 745c123..24e6ee8 100644 --- a/internal/repository/postgres_watcher.go +++ b/internal/repository/postgres_watcher.go @@ -285,6 +285,6 @@ func (p *postgresWatcherRepository) Delete(ctx context.Context, id int64) error func (p *postgresWatcherRepository) DeleteByTypeAndWatcheeID(ctx context.Context, typ domain.WatcherType, id int64) error { query := `DELETE FROM watchers WHERE type = $1 AND watchee_id = $2` - _, err := p.conn.Exec(ctx, query, typ, id) + _, err := p.conn.Exec(ctx, query, int64(typ), id) return err }