Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: send userId with github bug report

thecodrra3e95e50e0e4
diff --git a/packages/core/api/debug.js b/packages/core/api/debug.js
index 050e99134..3eb6efc5f 100644
--- a/packages/core/api/debug.js
+++ b/packages/core/api/debug.js
@@ -19,11 +19,23 @@ export default class Debug {
});
}
- async report(title, body) {
+ /**
+ *
+ * @param {{
+ * title: string,
+ * body: string,
+ * userId: string
+ * }} reportData
+ * @returns {string} link to the github issue
+ */
+ async report(reportData) {
+ if (!reportData) return;
+
+ const { title, body, userId } = reportData;
const response = await fetch(`${hosts.ISSUES_HOST}/create/notesnook`, {
method: "POST",
headers: { "Content-Type": "application/json" },
- body: JSON.stringify({ title, body }),
+ body: JSON.stringify({ title, body, userId }),
});
if (!response.ok) return;
const json = await response.json();