Add push operations to plugin

This commit is contained in:
Andras Schmelczer 2024-12-12 22:17:59 +00:00
parent a2066cfc1c
commit 9ce8245abc
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
7 changed files with 78 additions and 53 deletions

View file

@ -1,4 +1,3 @@
import { TFile } from "obsidian";
import { Database } from "src/database/database";
import { RelativePath } from "src/database/document-metadata";
import { SyncServer } from "src/services/sync_service";
@ -15,7 +14,8 @@ export async function syncLocallyDeletedFile(
await syncServer.delete({
documentId: metadata.documentId,
createdDate: new Date(), // We got the event now, so it must have been deleted now
// We got the event now, so it must have been deleted just now
createdDate: new Date(),
});
await database.removeDocument(path);