refactor(browser-extension): api url
This commit is contained in:
parent
edc4cd6a8a
commit
d70a482b97
@ -1,3 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* @description API URL
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
|
||||||
|
const apiUrl = 'https://api.cookie-dialog-monster-com/rest/v1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Base data URL
|
* @description Base data URL
|
||||||
* @type {string}
|
* @type {string}
|
||||||
@ -103,7 +110,7 @@ const report = () => {
|
|||||||
const version = chrome.runtime.getManifest().version;
|
const version = chrome.runtime.getManifest().version;
|
||||||
|
|
||||||
if (tab) {
|
if (tab) {
|
||||||
fetch('https://cdm-report-service.herokuapp.com/rest/v1/report/', {
|
fetch(`${apiUrl}/report/`, {
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
text: `There's a problem with ${tab.url} using ${userAgent} in CDM ${version}`,
|
text: `There's a problem with ${tab.url} using ${userAgent} in CDM ${version}`,
|
||||||
to: 'wanhose.development@gmail.com',
|
to: 'wanhose.development@gmail.com',
|
||||||
|
Loading…
Reference in New Issue
Block a user