From 9b73c744867f4d4f119b8a25c2e8252f00d816a6 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Wed, 7 Jul 2021 18:46:12 -0400 Subject: [PATCH] fix expiry --- cmd/apollo-worker/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/apollo-worker/main.go b/cmd/apollo-worker/main.go index 992215c..66c48f7 100644 --- a/cmd/apollo-worker/main.go +++ b/cmd/apollo-worker/main.go @@ -90,7 +90,7 @@ func accountWorker(id int, rc *reddit.Client, db *sql.DB, logger *log.Logger, st if account.ExpiresAt < int64(now) { tokens, _ := rac.RefreshTokens() tx.Exec(`UPDATE accounts SET access_token = $1, refresh_token = $2, expires_at = $3 WHERE id = $4`, - tokens.AccessToken, tokens.RefreshToken, now+3500, account.ID) + tokens.AccessToken, tokens.RefreshToken, int64(now+3500), account.ID) } t1 := time.Now()