changeset 352:a0e96f50bcce

chore: merge diverging branches
author Paper <paper@paper.us.eu.org>
date Sun, 14 Jul 2024 23:24:19 -0400
parents c844f8bb87ce (current diff) 7e97c566cce4 (diff)
children 2f094656e775
files
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/services/kitsu.cc	Sun Jul 14 23:23:56 2024 -0400
+++ b/src/services/kitsu.cc	Sun Jul 14 23:24:19 2024 -0400
@@ -86,10 +86,10 @@
 	return true;
 }
 
-static bool RefreshAccessToken(std::string& access_token, const std::string& refresh_token) {
+static bool RefreshAccessToken(void) {
 	const nlohmann::json request = {
 		{"grant_type", "refresh_token"},
-		{"refresh_token", refresh_token}
+		{"refresh_token", session.config.auth.kitsu.refresh_token},
 	};
 
 	if (!SendAuthRequest(request))
@@ -104,7 +104,7 @@
 	auto& auth = session.config.auth.kitsu;
 
 	if (Time::GetSystemTime() >= session.config.auth.kitsu.access_token_expiration)
-		if (!RefreshAccessToken(auth.access_token, auth.refresh_token))
+		if (!RefreshAccessToken())
 			return std::nullopt;
 
 	return auth.access_token;