trilium/public/javascripts/sync.js

22 lines
507 B
JavaScript
Raw Normal View History

2017-10-29 23:22:41 +08:00
function syncNow() {
$.ajax({
url: baseApiUrl + 'sync/now',
type: 'POST',
success: result => {
if (result.success) {
checkAudit();
message("Sync finished successfully");
2017-10-29 23:22:41 +08:00
for (const l of result.log)
{
console.log(l);
}
}
else {
alert("Sync failed");
}
},
error: () => alert("Sync failed")
});
}