sync app filled in
This commit is contained in:
@@ -112,6 +112,7 @@ Upload client changes and receive server changes + conflicts.
|
||||
"type": "update",
|
||||
"path": "hello.md",
|
||||
"hash": "d4e5f6...",
|
||||
"content": "# Hello\n\nUpdated content\n",
|
||||
"size": 50,
|
||||
"modified": "2024-01-15T10:05:00Z"
|
||||
}
|
||||
@@ -131,6 +132,7 @@ Upload client changes and receive server changes + conflicts.
|
||||
"modified": "2024-01-15T10:02:00Z"
|
||||
}
|
||||
],
|
||||
"newSnapshotId": "snap:macbook-pro-1:1234567999",
|
||||
"conflicts": [
|
||||
{
|
||||
"path": "hello.md",
|
||||
@@ -144,6 +146,10 @@ Upload client changes and receive server changes + conflicts.
|
||||
}
|
||||
```
|
||||
|
||||
For client create/update changes, the server accepts inline UTF-8 markdown in
|
||||
`content` and recomputes the SHA-256 hash before writing the file. If `content`
|
||||
is omitted, the supplied `hash` must already exist in the server content store.
|
||||
|
||||
### POST /api/sync/resolve
|
||||
|
||||
Resolve conflicts and finalize the sync.
|
||||
|
||||
Reference in New Issue
Block a user