mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Added extendable/scalable formatter for webhook data
Creates a new organsied formatting system for webhook data, with interfaces for extending with custom model formatting rules. Allows easy usage & extension of the default bookstack formatting behaviour when customizing webhook events via theme system, and keeps default data customizations organised. This also makes the following webhook data changes: - owned_by/created_by/updated_by user details are loaded for events with Entity details. (POTENTIALLY BREAKING CHANGE). - current_revision details are loaded for page update/create events. Added testing to cover added model formatting rules. For #3279 and #3218
This commit is contained in:
@ -23,12 +23,37 @@
|
||||
"priority": 2,
|
||||
"created_at": "2021-12-11T21:53:24.000000Z",
|
||||
"updated_at": "2021-12-11T22:25:10.000000Z",
|
||||
"created_by": 1,
|
||||
"updated_by": 1,
|
||||
"created_by": {
|
||||
"id": 1,
|
||||
"name": "Benny",
|
||||
"slug": "benny"
|
||||
},
|
||||
"updated_by": {
|
||||
"id": 1,
|
||||
"name": "Benny",
|
||||
"slug": "benny"
|
||||
},
|
||||
"draft": false,
|
||||
"revision_count": 9,
|
||||
"template": false,
|
||||
"owned_by": 1
|
||||
"owned_by": {
|
||||
"id": 1,
|
||||
"name": "Benny",
|
||||
"slug": "benny"
|
||||
},
|
||||
"current_revision": {
|
||||
"id": 597,
|
||||
"page_id": 2598,
|
||||
"name": "My wonderful updated page",
|
||||
"created_by": 1,
|
||||
"created_at": "2021-12-11T21:53:24.000000Z",
|
||||
"updated_at": "2021-12-11T21:53:24.000000Z",
|
||||
"slug": "my-wonderful-updated-page",
|
||||
"book_slug": "my-awesome-book",
|
||||
"type": "version",
|
||||
"summary": "Updated the title and fixed some spelling",
|
||||
"revision_number": 2
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
Reference in New Issue
Block a user