# HG changeset patch # User Paper # Date 1721013859 14400 # Node ID a0e96f50bcce76fb106d3f294667eaf44aeee725 # Parent c844f8bb87ce8d047d68cf456ea612b20114a2f3# Parent 7e97c566cce4c71fce8177ef7374e61fc5620ef5 chore: merge diverging branches diff -r c844f8bb87ce -r a0e96f50bcce src/services/kitsu.cc --- 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;