mirror of
https://github.com/zadam/trilium.git
synced 2024-12-26 09:12:08 +08:00
22 lines
No EOL
507 B
JavaScript
22 lines
No EOL
507 B
JavaScript
function syncNow() {
|
|
$.ajax({
|
|
url: baseApiUrl + 'sync/now',
|
|
type: 'POST',
|
|
success: result => {
|
|
if (result.success) {
|
|
checkAudit();
|
|
|
|
message("Sync finished successfully");
|
|
|
|
for (const l of result.log)
|
|
{
|
|
console.log(l);
|
|
}
|
|
}
|
|
else {
|
|
alert("Sync failed");
|
|
}
|
|
},
|
|
error: () => alert("Sync failed")
|
|
});
|
|
} |