From 1652387e87215d6d4d6b677d982865eb27b44ba3 Mon Sep 17 00:00:00 2001 From: sijanec Date: Wed, 20 May 2020 22:44:41 +0200 Subject: report usernames too --- assets/js/app.js.bvr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'assets/js') diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr index a75505e..8e150a2 100644 --- a/assets/js/app.js.bvr +++ b/assets/js/app.js.bvr @@ -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": }; + + // Load required data + data.client.username = await localforage.getItem("username"); + data.type = "error"; $.post("https://beziapp-report.gimb.tk/", data); } else { -- cgit v1.2.3 From c40b1bd1b0c465663eef509464e3807019727caf Mon Sep 17 00:00:00 2001 From: sijanec Date: Wed, 20 May 2020 22:47:01 +0200 Subject: syntax errro fix --- assets/js/app.js.bvr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assets/js') diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr index 8e150a2..1ddf4a4 100644 --- a/assets/js/app.js.bvr +++ b/assets/js/app.js.bvr @@ -62,7 +62,7 @@ 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, "username": }; + 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"); -- cgit v1.2.3 From a1705397ab7bcadc6025fda819bd46855d7f82a7 Mon Sep 17 00:00:00 2001 From: sijanec Date: Wed, 20 May 2020 22:47:59 +0200 Subject: i should check code before pushing --- assets/js/app.js.bvr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assets/js') diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr index 1ddf4a4..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"; -- cgit v1.2.3