summaryrefslogtreecommitdiffstats
path: root/src/web_service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-01 03:37:07 +0100
committerGitHub <noreply@github.com>2018-11-01 03:37:07 +0100
commitd08457f8796a9287b59e77c6f06c620d6f07d4d4 (patch)
tree5f19e368bd827be7ee68f2901a39a5462a06692f /src/web_service
parentMerge pull request #1528 from FernandoS27/assert-control-codes (diff)
parentcompatdb: Use a seperate endpoint for testcase submission (diff)
downloadyuzu-d08457f8796a9287b59e77c6f06c620d6f07d4d4.tar
yuzu-d08457f8796a9287b59e77c6f06c620d6f07d4d4.tar.gz
yuzu-d08457f8796a9287b59e77c6f06c620d6f07d4d4.tar.bz2
yuzu-d08457f8796a9287b59e77c6f06c620d6f07d4d4.tar.lz
yuzu-d08457f8796a9287b59e77c6f06c620d6f07d4d4.tar.xz
yuzu-d08457f8796a9287b59e77c6f06c620d6f07d4d4.tar.zst
yuzu-d08457f8796a9287b59e77c6f06c620d6f07d4d4.zip
Diffstat (limited to '')
-rw-r--r--src/web_service/telemetry_json.cpp21
-rw-r--r--src/web_service/telemetry_json.h1
2 files changed, 17 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
diff --git a/src/web_service/telemetry_json.h b/src/web_service/telemetry_json.h
index 93371414a..dfd202829 100644
--- a/src/web_service/telemetry_json.h
+++ b/src/web_service/telemetry_json.h
@@ -35,6 +35,7 @@ public:
void Visit(const Telemetry::Field<std::chrono::microseconds>& field) override;
void Complete() override;
+ bool SubmitTestcase() override;
private:
struct Impl;