Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 49cc8673 authored by peter_rabbit's avatar peter_rabbit
Browse files

try fix cors

parent 38630ab2
No related branches found
No related tags found
No related merge requests found
......@@ -166,25 +166,26 @@ module.exports = {
function fetchjson(url) {
return new Promise((resolve, reject) => {
fetch(url)
fetch(url, { mode: "no-cors" })
.then(r => r.json())
.then(r => resolve(r))
.catch(e => reject(e));
});
};
}
function fetchtext(url) {
return new Promise((resolve, reject) => {
fetch(url)
fetch(url, { mode: "no-cors" })
.then(r => r.text())
.then(r => resolve(r))
.catch(e => reject(e));
});
};
}
module.exports = {
fetchjson, fetchtext
}
fetchjson,
fetchtext,
};
},{}],6:[function(require,module,exports){
"use strict";
......
......@@ -435,25 +435,26 @@ module.exports = {
function fetchjson(url) {
return new Promise((resolve, reject) => {
fetch(url)
fetch(url, { mode: "no-cors" })
.then(r => r.json())
.then(r => resolve(r))
.catch(e => reject(e));
});
};
}
function fetchtext(url) {
return new Promise((resolve, reject) => {
fetch(url)
fetch(url, { mode: "no-cors" })
.then(r => r.text())
.then(r => resolve(r))
.catch(e => reject(e));
});
};
}
module.exports = {
fetchjson, fetchtext
}
fetchjson,
fetchtext,
};
},{}],9:[function(require,module,exports){
"use strict";
......
......@@ -2,22 +2,23 @@
function fetchjson(url) {
return new Promise((resolve, reject) => {
fetch(url)
fetch(url, { mode: "no-cors" })
.then(r => r.json())
.then(r => resolve(r))
.catch(e => reject(e));
});
};
}
function fetchtext(url) {
return new Promise((resolve, reject) => {
fetch(url)
fetch(url, { mode: "no-cors" })
.then(r => r.text())
.then(r => resolve(r))
.catch(e => reject(e));
});
};
}
module.exports = {
fetchjson, fetchtext
}
fetchjson,
fetchtext,
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment