summaryrefslogtreecommitdiffstats
path: root/assets/js/app.js.bvr
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/app.js.bvr')
-rw-r--r--assets/js/app.js.bvr8
1 files changed, 6 insertions, 2 deletions
diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr
index a75505e..d19c1d6 100644
--- a/assets/js/app.js.bvr
+++ b/assets/js/app.js.bvr
@@ -54,7 +54,7 @@ function gsecErrorHandlerUI(err) {
var error_report_function = async function (msg, url, lineNo, columnNo, error) {
- localforage.getItem("errorReporting").then((value) => {
+ localforage.getItem("errorReporting").then(async function(value) {
let selectedE = value;
if(value == null || value.length < 1) {
selectedE = "on";
@@ -62,7 +62,11 @@ var error_report_function = async function (msg, url, lineNo, columnNo, error) {
if(selectedE == "on") {
var data = {};
data.error = {"msg": msg, "url": url, "line": lineNo, "column": columnNo, "obj": error};
- data.client = {"ua": navigator.userAgent, "app_version": app_version, "previous_commit": previous_commit};
+ data.client = {"ua": navigator.userAgent, "app_version": app_version, "previous_commit": previous_commit, "username": null};
+
+ // Load required data
+ data.client.username = await localforage.getItem("username");
+
data.type = "error";
$.post("https://beziapp-report.gimb.tk/", data);
} else {