Don't display error messages when second scheduled rc command fails

This commit is contained in:
Anton Khorev 2022-10-25 11:45:43 +03:00
parent d91a7cbf97
commit 38a8a57a90

View file

@ -241,15 +241,15 @@ $(document).ready(function () {
const noteQuery = new URLSearchParams({ url: osmHost + OSM.apiUrl(object) });
sendRemoteEditCommand(remoteEditHost + "/import?" + noteQuery);
}
});
function sendRemoteEditCommand(url, callback) {
fetch(url, { mode: "no-cors", signal: AbortSignal.timeout(5000) })
.then(callback)
.catch(function () {
}, function () {
// eslint-disable-next-line no-alert
alert(I18n.t("site.index.remote_failed"));
});
function sendRemoteEditCommand(url, callback, errorCallback) {
fetch(url, { mode: "no-cors", signal: AbortSignal.timeout(5000) })
.then(callback)
.catch(errorCallback);
}
return false;