[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) { Common.Utils.loadConfig = function(url, callback) {
"use strict"; fetch(url, {
method: 'get',
fetch(url) headers: {
.then(function(response){ 'Accept': 'application/json',
},
}).then(function(response){
if ( response.ok ) if ( response.ok )
return response.json(); return response.json();
else return 'error'; else return 'error';