mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
added support for trilium-sender
This commit is contained in:
@@ -149,6 +149,9 @@ async function pullSync(syncContext) {
|
||||
else if (sync.entityName === 'attributes') {
|
||||
await syncUpdate.updateAttribute(resp, syncContext.sourceId);
|
||||
}
|
||||
else if (sync.entityName === 'api_tokens') {
|
||||
await syncUpdate.updateApiToken(resp, syncContext.sourceId);
|
||||
}
|
||||
else {
|
||||
throw new Error(`Unrecognized entity type ${sync.entityName} in sync #${sync.id}`);
|
||||
}
|
||||
@@ -233,6 +236,9 @@ async function pushEntity(sync, syncContext) {
|
||||
else if (sync.entityName === 'attributes') {
|
||||
entity = await sql.getRow('SELECT * FROM attributes WHERE attributeId = ?', [sync.entityId]);
|
||||
}
|
||||
else if (sync.entityName === 'api_tokens') {
|
||||
entity = await sql.getRow('SELECT * FROM api_tokens WHERE apiTokenId = ?', [sync.entityId]);
|
||||
}
|
||||
else {
|
||||
throw new Error(`Unrecognized entity type ${sync.entityName} in sync #${sync.id}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user