diff options
author | greggameplayer <33609333+greggameplayer@users.noreply.github.com> | 2018-11-02 14:26:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-02 14:26:32 +0100 |
commit | cb8e4a46330ca23496c3a77f42d9d16dc26e0dbe (patch) | |
tree | cedafffe5a605a1ed914e1d1df1267a3cd299fc9 /src/web_service/telemetry_json.cpp | |
parent | 9ae972ab4e8279c2b471deb4e2fafb8e3f24a572 (diff) | |
parent | 1069eced8482bd01be9fd305447ef94a82c4c999 (diff) |
Merge branch 'master' into Texture2DArray
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 |