From 3803fea0558bbe6c75a947d31ea23a24d92caf6a Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Sun, 8 May 2022 20:56:04 -0400 Subject: [PATCH] fix watcher creation --- internal/repository/postgres_watcher.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/repository/postgres_watcher.go b/internal/repository/postgres_watcher.go index c165663..c8351b2 100644 --- a/internal/repository/postgres_watcher.go +++ b/internal/repository/postgres_watcher.go @@ -211,8 +211,6 @@ func (p *postgresWatcherRepository) Create(ctx context.Context, watcher *domain. return err } - now := float64(time.Now().UTC().Unix()) - query := ` INSERT INTO watchers (created_at, last_notified_at, label, device_id, account_id, type, watchee_id, author, subreddit, upvotes, keyword, flair, domain) @@ -222,7 +220,7 @@ func (p *postgresWatcherRepository) Create(ctx context.Context, watcher *domain. return p.conn.QueryRow( ctx, query, - now, + time.Now(), watcher.Label, watcher.DeviceID, watcher.AccountID,