[common] refactoring

This commit is contained in:
Maxim Kadushkin 2021-06-25 11:29:11 +03:00
parent 4afe790e0f
commit 88c62da5f6

View file

@ -797,10 +797,12 @@ Common.Utils.getConfigJson = function (url) {
};
Common.Utils.loadConfig = function(url, callback) {
"use strict";
fetch(url)
.then(function(response){
fetch(url, {
method: 'get',
headers: {
'Accept': 'application/json',
},
}).then(function(response){
if ( response.ok )
return response.json();
else return 'error';