trilium/public/javascripts/sync.js
2017-11-03 22:08:27 -04:00

17 lines
No EOL
380 B
JavaScript

function syncNow() {
$.ajax({
url: baseApiUrl + 'sync/now',
type: 'POST',
success: result => {
if (result.success) {
checkStatus();
message("Sync triggered.");
}
else {
error("Sync failed");
}
},
error: () => error("Sync failed")
});
}