trilium/public/javascripts/sync.js

17 lines
380 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) {
checkStatus();
message("Sync triggered.");
2017-10-29 23:22:41 +08:00
}
else {
error("Sync failed");
2017-10-29 23:22:41 +08:00
}
},
error: () => error("Sync failed")
2017-10-29 23:22:41 +08:00
});
}