fetchMd5 with API without options

This commit is contained in:
Rob Garrison 2018-11-16 07:48:57 -06:00
parent 04bed35cab
commit c5a287a204

View File

@ -551,7 +551,7 @@ window.addEventListener('showStyles:done', function _() {
Promise.all([ Promise.all([
fetchStyleJson(result), fetchStyleJson(result),
fetchStyleSettings(result), fetchStyleSettings(result),
fetchMd5(result) API.download({url: UPDATE_URL.replace('%', result.id)})
]) ])
.then(([style, settings, md5]) => { .then(([style, settings, md5]) => {
pingback(result); pingback(result);
@ -579,19 +579,6 @@ window.addEventListener('showStyles:done', function _() {
return result.style_settings; return result.style_settings;
}); });
} }
function fetchMd5(result) {
return API.download({
url: UPDATE_URL.replace('%', result.id),
timeout: 60e3,
// USO can't handle POST requests for style json
body: null,
})
.catch(error => {
alert('Error' + (error ? '\n' + error : ''));
throw error;
});
}
} }
function pingback(result) { function pingback(result) {