mirror of
https://github.com/kovetskiy/mark.git
synced 2026-04-20 05:12:35 +00:00
Add option to pass a version message
This commit is contained in:
committed by
Manuel Rüger
parent
b7cb1824ae
commit
9b91ee3344
@@ -503,7 +503,7 @@ func (api *API) CreatePage(
|
||||
return request.Response.(*PageInfo), nil
|
||||
}
|
||||
|
||||
func (api *API) UpdatePage(page *PageInfo, newContent string, minorEdit bool, newLabels []string, appearance string) error {
|
||||
func (api *API) UpdatePage(page *PageInfo, newContent string, minorEdit bool, versionMessage string, newLabels []string, appearance string) error {
|
||||
nextPageVersion := page.Version.Number + 1
|
||||
oldAncestors := []map[string]interface{}{}
|
||||
|
||||
@@ -532,6 +532,7 @@ func (api *API) UpdatePage(page *PageInfo, newContent string, minorEdit bool, ne
|
||||
"version": map[string]interface{}{
|
||||
"number": nextPageVersion,
|
||||
"minorEdit": minorEdit,
|
||||
"message": versionMessage,
|
||||
},
|
||||
"ancestors": oldAncestors,
|
||||
"body": map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user