Mercurial > minori
diff src/services/anilist.cpp @ 63:3d2decf093bb
*: fix many clang warnings
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 01 Oct 2023 06:39:47 -0400 |
parents | 0c4138de2ea7 |
children | fe719c109dbc |
line wrap: on
line diff
--- a/src/services/anilist.cpp Sun Oct 01 06:16:06 2023 -0400 +++ b/src/services/anilist.cpp Sun Oct 01 06:39:47 2023 -0400 @@ -6,9 +6,9 @@ #include "core/session.h" #include "core/strings.h" #include "gui/translate/anilist.h" +#include <QDebug> #include <QDesktopServices> #include <QInputDialog> -#include <QDebug> #include <QLineEdit> #include <QMessageBox> #include <QUrl> @@ -19,7 +19,8 @@ using nlohmann::literals::operator"" _json_pointer; -namespace Services::AniList { +namespace Services { +namespace AniList { class Account { public: @@ -282,11 +283,13 @@ * Date completedAt **/ Anime::Anime& anime = Anime::db.items[id]; - const std::string query = "mutation ($media_id: Int, $progress: Int, $status: MediaListStatus, $score: Int, $notes: String) {\n" - " SaveMediaListEntry (mediaId: $media_id, progress: $progress, status: $status, scoreRaw: $score, notes: $notes) {\n" - " id\n" - " }\n" - "}\n"; + const std::string query = + "mutation ($media_id: Int, $progress: Int, $status: MediaListStatus, $score: Int, $notes: String) {\n" + " SaveMediaListEntry (mediaId: $media_id, progress: $progress, status: $status, scoreRaw: $score, notes: " + "$notes) {\n" + " id\n" + " }\n" + "}\n"; // clang-format off nlohmann::json json = { {"query", query}, @@ -331,11 +334,12 @@ " }\n" "}\n"; nlohmann::json json = { - {"query", query} - }; + {"query", query} + }; auto ret = nlohmann::json::parse(SendRequest(json.dump())); ParseUser(json["Viewer"]); return true; } -} // namespace Services::AniList +} // namespace AniList +} // namespace Services