Mercurial > minori
diff src/services/anilist.cpp @ 76:3364fadc8a36
*: format source code
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 04 Oct 2023 01:46:33 -0400 |
parents | d3e9310598b1 |
children | 6f7385bd334c |
line wrap: on
line diff
--- a/src/services/anilist.cpp Wed Oct 04 01:42:30 2023 -0400 +++ b/src/services/anilist.cpp Wed Oct 04 01:46:33 2023 -0400 @@ -2,8 +2,8 @@ #include "core/anime.h" #include "core/anime_db.h" #include "core/config.h" +#include "core/http.h" #include "core/json.h" -#include "core/http.h" #include "core/session.h" #include "core/strings.h" #include "gui/translate/anilist.h" @@ -38,11 +38,8 @@ static Account account; std::string SendRequest(std::string data) { - std::vector<std::string> headers = { - "Authorization: Bearer " + account.AuthToken(), - "Accept: application/json", - "Content-Type: application/json" - }; + std::vector<std::string> headers = {"Authorization: Bearer " + account.AuthToken(), "Accept: application/json", + "Content-Type: application/json"}; return HTTP::PerformBasicPostRequest("https://graphql.anilist.co", data, headers); } @@ -74,16 +71,11 @@ return "REWATCHING"; switch (anime.GetUserStatus()) { - case Anime::ListStatus::PLANNING: - return "PLANNING"; - case Anime::ListStatus::COMPLETED: - return "COMPLETED"; - case Anime::ListStatus::DROPPED: - return "DROPPED"; - case Anime::ListStatus::PAUSED: - return "PAUSED"; - default: - break; + case Anime::ListStatus::PLANNING: return "PLANNING"; + case Anime::ListStatus::COMPLETED: return "COMPLETED"; + case Anime::ListStatus::DROPPED: return "DROPPED"; + case Anime::ListStatus::PAUSED: return "PAUSED"; + default: break; } return "CURRENT"; }