Add revision diff endpoint and progressive enhancement export/wiki UI.
Diff: GET /api/v1/revisions/{id}/diff/{other_id} — unified diff between two revisions.
UI: <details>-based export menus on thread and node views (works without JS).
UI: Revision history link for wiki-mode namespaces.
This commit is contained in:
parent
75bec564b2
commit
46bdf3a217
8 changed files with 258 additions and 0 deletions
26
docs/api.md
26
docs/api.md
|
|
@ -527,6 +527,32 @@ Response `200`:
|
|||
|
||||
---
|
||||
|
||||
### Diff Revisions
|
||||
|
||||
```
|
||||
GET /api/v1/revisions/{revision_id}/diff/{other_id}
|
||||
```
|
||||
|
||||
Compares two revisions of the same node. Returns a unified diff.
|
||||
|
||||
Response `200`:
|
||||
```json
|
||||
{
|
||||
"from_revision": "...",
|
||||
"to_revision": "...",
|
||||
"from_number": 1,
|
||||
"to_number": 2,
|
||||
"node_id": "...",
|
||||
"diff": "--- revision 1\n+++ revision 2\n@@ ... @@\n..."
|
||||
}
|
||||
```
|
||||
|
||||
Errors:
|
||||
- `400` if the two revisions belong to different nodes
|
||||
- `404` if either revision is not found
|
||||
|
||||
---
|
||||
|
||||
### Theme CSS
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue