"sync now" button

This commit is contained in:
azivner
2017-10-29 11:22:41 -04:00
parent c28b7775a5
commit d613200925
5 changed files with 79 additions and 25 deletions

View File

@@ -0,0 +1,20 @@
function syncNow() {
$.ajax({
url: baseApiUrl + 'sync/now',
type: 'POST',
success: result => {
if (result.success) {
alert("Sync finished successfully");
for (const l of result.log)
{
console.log(l);
}
}
else {
alert("Sync failed");
}
},
error: () => alert("Sync failed")
});
}