refactor(browser-extension): api url

This commit is contained in:
wanhose 2022-05-12 20:41:49 +02:00
parent edc4cd6a8a
commit d70a482b97

View File

@ -1,3 +1,10 @@
/**
* @description API URL
* @type {string}
*/
const apiUrl = 'https://api.cookie-dialog-monster-com/rest/v1';
/**
* @description Base data URL
* @type {string}
@ -103,7 +110,7 @@ const report = () => {
const version = chrome.runtime.getManifest().version;
if (tab) {
fetch('https://cdm-report-service.herokuapp.com/rest/v1/report/', {
fetch(`${apiUrl}/report/`, {
body: JSON.stringify({
text: `There's a problem with ${tab.url} using ${userAgent} in CDM ${version}`,
to: 'wanhose.development@gmail.com',