From ca8fc6e991c99f7da11e8b3d610e1423729c571a Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Wed, 25 May 2022 19:28:41 -0400 Subject: [PATCH] tighten authenticated client params --- internal/reddit/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/reddit/client.go b/internal/reddit/client.go index c1e89a3..2a2e989 100644 --- a/internal/reddit/client.go +++ b/internal/reddit/client.go @@ -124,6 +124,10 @@ func (rc *Client) NewAuthenticatedClient(redditId, refreshToken, accessToken str panic("requires a redditId") } + if accessToken == "" { + panic("requires an access token") + } + return &AuthenticatedClient{rc, redditId, refreshToken, accessToken} }