mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
add memberId to entity_changes to avoid having to resend all changes second time
This commit is contained in:
@@ -9,7 +9,7 @@ async function getHeaders(headers) {
|
||||
// headers need to be lowercase because node.js automatically converts them to lower case
|
||||
// also avoiding using underscores instead of dashes since nginx filters them out by default
|
||||
const allHeaders = {
|
||||
'trilium-source-id': glob.sourceId,
|
||||
'trilium-component-id': glob.componentId,
|
||||
'trilium-local-now-datetime': utils.localNowDateTime(),
|
||||
'trilium-hoisted-note-id': activeNoteContext ? activeNoteContext.hoistedNoteId : null,
|
||||
'x-csrf-token': glob.csrfToken
|
||||
@@ -29,20 +29,20 @@ async function getHeaders(headers) {
|
||||
return allHeaders;
|
||||
}
|
||||
|
||||
async function get(url, sourceId) {
|
||||
return await call('GET', url, null, {'trilium-source-id': sourceId});
|
||||
async function get(url, componentId) {
|
||||
return await call('GET', url, null, {'trilium-component-id': componentId});
|
||||
}
|
||||
|
||||
async function post(url, data, sourceId) {
|
||||
return await call('POST', url, data, {'trilium-source-id': sourceId});
|
||||
async function post(url, data, componentId) {
|
||||
return await call('POST', url, data, {'trilium-component-id': componentId});
|
||||
}
|
||||
|
||||
async function put(url, data, sourceId) {
|
||||
return await call('PUT', url, data, {'trilium-source-id': sourceId});
|
||||
async function put(url, data, componentId) {
|
||||
return await call('PUT', url, data, {'trilium-component-id': componentId});
|
||||
}
|
||||
|
||||
async function remove(url, sourceId) {
|
||||
return await call('DELETE', url, null, {'trilium-source-id': sourceId});
|
||||
async function remove(url, componentId) {
|
||||
return await call('DELETE', url, null, {'trilium-component-id': componentId});
|
||||
}
|
||||
|
||||
let i = 1;
|
||||
|
||||
Reference in New Issue
Block a user