update
This commit is contained in:
@@ -9,4 +9,4 @@ DB_PATH = Path(os.getenv("DB_PATH", DATA_DIR / "desktop.db"))
|
||||
# Jeder Client schickt diesen Token als "Authorization: Bearer <Token>"
|
||||
SYNC_TOKEN = os.getenv("SYNC_TOKEN", "")
|
||||
|
||||
COLLECTIONS = ("events", "todos", "notes")
|
||||
COLLECTIONS = ("events", "todos", "notes", "folders")
|
||||
|
||||
@@ -32,6 +32,7 @@ class SyncIn(BaseModel):
|
||||
events: list[dict] = []
|
||||
todos: list[dict] = []
|
||||
notes: list[dict] = []
|
||||
folders: list[dict] = []
|
||||
|
||||
|
||||
@app.get("/api/health")
|
||||
|
||||
@@ -78,6 +78,13 @@ def test_tombstone(client):
|
||||
assert client.get("/api/notes", headers=AUTH).json() == []
|
||||
|
||||
|
||||
def test_ordner_laufen_mit(client):
|
||||
r = sync(client, folders=[{"id": "Projekte/Alt", "updated": "2026-09-19T10:00:00.000Z", "deleted": False}])
|
||||
assert r["folders"][0]["id"] == "Projekte/Alt"
|
||||
r = sync(client, since=1, folders=[{"id": "Projekte/Alt", "updated": "2026-09-19T10:05:00.000Z", "deleted": True}])
|
||||
assert r["folders"][0]["deleted"] is True
|
||||
|
||||
|
||||
def test_seit_cursor_liefert_nur_neues(client):
|
||||
sync(client, events=[{"id": "e1", "updated": "2026-09-19T10:00:00.000Z", "title": "a"}])
|
||||
sync(client, events=[{"id": "e2", "updated": "2026-09-19T10:00:00.000Z", "title": "b"}])
|
||||
|
||||
Reference in New Issue
Block a user