This commit is contained in:
Andre Medeiros 2022-03-01 17:25:26 -05:00
parent e5ea131145
commit 2c2ae76574

View file

@ -137,7 +137,9 @@ func (p *postgresWatcherRepository) GetByTypeAndWatcheeID(ctx context.Context, t
devices.sandbox, devices.sandbox,
accounts.id, accounts.id,
accounts.access_token, accounts.access_token,
accounts.refresh_token accounts.refresh_token,
subreddits.name AS subreddit_label,
users.name AS user_label
FROM watchers FROM watchers
INNER JOIN devices ON watchers.device_id = devices.id INNER JOIN devices ON watchers.device_id = devices.id
INNER JOIN accounts ON watchers.account_id = accounts.id INNER JOIN accounts ON watchers.account_id = accounts.id
@ -183,7 +185,9 @@ func (p *postgresWatcherRepository) GetByDeviceAPNSTokenAndAccountRedditID(ctx c
devices.sandbox, devices.sandbox,
accounts.id, accounts.id,
accounts.access_token, accounts.access_token,
accounts.refresh_token accounts.refresh_token,
subreddits.name AS subreddit_label,
users.name AS user_label
FROM watchers FROM watchers
INNER JOIN accounts ON watchers.account_id = accounts.id INNER JOIN accounts ON watchers.account_id = accounts.id
INNER JOIN devices ON watchers.device_id = devices.id INNER JOIN devices ON watchers.device_id = devices.id