From 2c2ae76574fe178f679e2476eeed89b5afdabcae Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Tue, 1 Mar 2022 17:25:26 -0500 Subject: [PATCH] fix sql --- internal/repository/postgres_watcher.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/repository/postgres_watcher.go b/internal/repository/postgres_watcher.go index 0811ab3..4aff173 100644 --- a/internal/repository/postgres_watcher.go +++ b/internal/repository/postgres_watcher.go @@ -137,7 +137,9 @@ func (p *postgresWatcherRepository) GetByTypeAndWatcheeID(ctx context.Context, t devices.sandbox, accounts.id, accounts.access_token, - accounts.refresh_token + accounts.refresh_token, + subreddits.name AS subreddit_label, + users.name AS user_label FROM watchers INNER JOIN devices ON watchers.device_id = devices.id INNER JOIN accounts ON watchers.account_id = accounts.id @@ -183,7 +185,9 @@ func (p *postgresWatcherRepository) GetByDeviceAPNSTokenAndAccountRedditID(ctx c devices.sandbox, accounts.id, accounts.access_token, - accounts.refresh_token + accounts.refresh_token, + subreddits.name AS subreddit_label, + users.name AS user_label FROM watchers INNER JOIN accounts ON watchers.account_id = accounts.id INNER JOIN devices ON watchers.device_id = devices.id