diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-31 22:37:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-31 22:37:07 -0400 |
commit | d08457f8796a9287b59e77c6f06c620d6f07d4d4 (patch) | |
tree | 5f19e368bd827be7ee68f2901a39a5462a06692f /src/web_service/telemetry_json.cpp | |
parent | 86e70cf30210c6a43b23884012cc5e24fff68d03 (diff) | |
parent | 585b6a6a5037f9ef630a244ede18ac7854955fc6 (diff) |
Merge pull request #1604 from FearlessTobi/port-4369
Port citra-emu/citra#4369: "compatdb: Use a seperate endpoint for testcase submission"
Diffstat (limited to 'src/web_service/telemetry_json.cpp')
-rw-r--r-- | src/web_service/telemetry_json.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/web_service/telemetry_json.cpp b/src/web_service/telemetry_json.cpp index 0a8f2bd9e..9156ce802 100644 --- a/src/web_service/telemetry_json.cpp +++ b/src/web_service/telemetry_json.cpp @@ -102,16 +102,27 @@ void TelemetryJson::Complete() { impl->SerializeSection(Telemetry::FieldType::App, "App"); impl->SerializeSection(Telemetry::FieldType::Session, "Session"); impl->SerializeSection(Telemetry::FieldType::Performance, "Performance"); - impl->SerializeSection(Telemetry::FieldType::UserFeedback, "UserFeedback"); impl->SerializeSection(Telemetry::FieldType::UserConfig, "UserConfig"); impl->SerializeSection(Telemetry::FieldType::UserSystem, "UserSystem"); auto content = impl->TopSection().dump(); // Send the telemetry async but don't handle the errors since they were written to the log - Common::DetachedTasks::AddTask( - [host{impl->host}, username{impl->username}, token{impl->token}, content]() { - Client{host, username, token}.PostJson("/telemetry", content, true); - }); + Common::DetachedTasks::AddTask([host{impl->host}, content]() { + Client{host, "", ""}.PostJson("/telemetry", content, true); + }); +} + +bool TelemetryJson::SubmitTestcase() { + impl->SerializeSection(Telemetry::FieldType::App, "App"); + impl->SerializeSection(Telemetry::FieldType::Session, "Session"); + impl->SerializeSection(Telemetry::FieldType::UserFeedback, "UserFeedback"); + impl->SerializeSection(Telemetry::FieldType::UserSystem, "UserSystem"); + + auto content = impl->TopSection().dump(); + Client client(impl->host, impl->username, impl->token); + auto value = client.PostJson("/gamedb/testcase", content, false); + + return value.result_code == Common::WebResult::Code::Success; } } // namespace WebService |