Mercurial > minori
changeset 335:5098387a3a46
kitsu: remove unused constants, fix token expiration calculation
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 19 Jun 2024 06:11:38 -0400 |
parents | 948955c3ba81 |
children | d260549151d6 |
files | src/services/kitsu.cc |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/services/kitsu.cc Mon Jun 17 20:35:31 2024 -0400 +++ b/src/services/kitsu.cc Wed Jun 19 06:11:38 2024 -0400 @@ -28,9 +28,6 @@ using namespace nlohmann::literals::json_literals; -static constexpr std::string_view CLIENT_ID = "dd031b32d2f56c990b1425efe6c42ad847e7fe3ab46bf1299f05ecd856bdb7dd"; -static constexpr std::string_view CLIENT_SECRET = "54d7307928f63414defd96399fc31ba847961ceaecef3a5fd93144e960c0e151"; - static constexpr std::string_view BASE_API_PATH = "https://kitsu.io/api/edge"; static constexpr std::string_view OAUTH_PATH = "https://kitsu.io/api/oauth/token"; @@ -80,7 +77,7 @@ session.config.auth.kitsu.access_token = result["/access_token"_json_pointer].get<std::string>(); session.config.auth.kitsu.access_token_expiration - = result["/created_at"_json_pointer].get<Time::Timestamp>(); + = result["/created_at"_json_pointer].get<Time::Timestamp>() + result["/expires_in"_json_pointer].get<Time::Timestamp>(); session.config.auth.kitsu.refresh_token = result["/refresh_token"_json_pointer].get<std::string>();