From 65fc7a5298d1ff2874a4c9179d873f84431d487c Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Fri, 31 Mar 2023 11:57:09 -0400 Subject: [PATCH] fix watchers --- internal/api/accounts.go | 2 +- internal/repository/postgres_watcher.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/accounts.go b/internal/api/accounts.go index 011c0e3..9ed244c 100644 --- a/internal/api/accounts.go +++ b/internal/api/accounts.go @@ -163,7 +163,7 @@ func (a *api) upsertAccountsHandler(w http.ResponseWriter, r *http.Request) { me, err := rac.Me(ctx) if err != nil { - err := fmt.Errorf("failed to fetch user info: %w", err) + err = fmt.Errorf("failed to fetch user info: %w", err) a.errorResponse(w, r, 422, err) return } diff --git a/internal/repository/postgres_watcher.go b/internal/repository/postgres_watcher.go index 24e6ee8..7bc5dbe 100644 --- a/internal/repository/postgres_watcher.go +++ b/internal/repository/postgres_watcher.go @@ -226,7 +226,7 @@ func (p *postgresWatcherRepository) Create(ctx context.Context, watcher *domain. watcher.Label, watcher.DeviceID, watcher.AccountID, - watcher.Type, + int64(watcher.Type), watcher.WatcheeID, watcher.Author, watcher.Subreddit,